Fix encoding tests on windows. Fix url/path tests cross-platform.