Normalize urls by removing .. and . constructs, and only percent-encode the bytes that encodeURIComponent would.