Fix path logic bug for Windows.