always use the tempfile module for temporary directories