Use tempfile for CopyFileWithTar