Add fix_url

Sometimes, the parsed urls are invalid because of some whitespace add
the beginning/end of the url, or because of a missing uri sheme. The
fix_url function fixes this.
Merge pull request #140 from jonasdt/master

Fix invalid urls. This fixes issue #116.