Escape unsafe characters in urls.

Fixes #133