change test tmpfile name gen so it works on windows (thanks Anders Forsgren!)