Use Tempfile.open directly