Using tempfile.mkdtmp instead of os.getcwd

Removed explicit directory creation within current working directory.