Extracted the url building utilities to a new trait in its own file

Also renamed the encode/decode methods to urlEncode/urlDecode
Some improvements around dealing with the Last-Modified header and making sure all datetimes are treated as UTC