Windows fix.

The stdlib urlsplit doesn't really work on Windows. It doesn't handle
Windows file paths correctly. Introduced a work around when running on
Windows to fix this bug that is not actually my fault.