Windows tempfile fix for 1.8