Properly urlencode the paths

Because unless you do it, NSURL will not work correctly