Fix nul and backslash detection bug in Path::IsValidPath()