Fix URL encoding.

It seems that due to the use of `Data.Char.isAlphaNum`, which returns `True` for characters outside of the ASCII range, many bytes are not correctly encoded.

For example, `ø` in utf8 encodes to `\195\184` and since `isAlphaNum '\195' == True`, the (incorrect) result was `\195%b8`.

This patch fixes the issue and also adds `_` and `~` to the list of characters not needing any encoding as they appear in the list of unreserved characters according to [RFC2396](http://tools.ietf.org/html/rfc2396.html#section-2.3) and should thus never be encoded.