Properly escape all args, some rework

Makes sure to encode all uri components
Add some unit tests
Merge pull request #4 from christianbundy/euankdev

Escape args, add some tests