fix an issue that causes Errno::ENAMETOOLONG on Tempfile creation/deletion