Fix Error in tempfile() under Windows. Thanks to Saurabh Agrawal for the report.