ENH Changed the way that mktempfile works