fix trailing slash check for Windows

after path is normalized, trailing slash becomes a backslash on windows