Create temporary files in a non-shared temp dir

When running unit tests in parallel, sharing a temporary directory is bad.