fix fix for stat.t on win32

My previous commit made a test open a file, then delete it. It should of
course have closed the file before deleting it. On Linux this is just bad
manners, but on Win32 it actively fails.