Improved temporary file name creation.