fix tmp directory in __main__ (see #2)