Some functions to parse and normalize URLs.