Fix filename replacement on Windows.