Windows path fixes

Fix uppercase drive letters, paths with multiple backslashes.

string.replace(string, string) only replaces the first match.
Merge pull request #1425 from SLaks/patch-1

Windows path fixes