Use os.tmpdir() instead of '/tmp/'