msvc: opendir: handle paths ending with a slash