pull `url_encode` into a module

[fixes #4]