Normalizes multiple directory separators in normalizePath

This accounts for the scenario where a path may contain two or more consecutive directory separators in a path.
This is going to give issues. The paths aren't only for local paths. People on windows for example will have the wrong fix when using the `DIRECTORY_SEPARATOR` constant. I'd suggest either making a super clever regex replace which deals with both `\` and `/`. Or do two replacements.