code: def getTempFile(suffix="", rootDir=None):
      
      if rootDir is None:
          handle, tmpFile = tempfile.mkstemp(suffix)
          os.close(handle)
          return tmpFile
      else:
          tmpFile = os.path.join(rootDir, "tmp_" + getRandomAlphaNumericString() + suffix)
          open(tmpFile, 'w').close()
          os.chmod(tmpFile, 0777) #Ensure everyone has access to the file.
          return tmpFile
docs: Returns a string representing a temporary file, that must be manually deleted