Fix filename handling on Windows