Replaced custom tempDir() function with os.TempDir() that does the same.

As far as I can tell, your custom tempDir() does the same thing as the standard library's os.TempDir(), so might as well use it.