Create temporary files in the test scratch directory instead of in the default temporary file directory. Reviewed-by: alanb