Fix filename logic on windows.