Better solution is to use https://docs.python.org/2/library/tempfile.html#tempfile.mkdtemp