Re #6966. Use the output directory as a temp directory.