Fix percent encoding

stringByAddingPercentEscapesUsingEncoding is not reliable

http://simonwoodside.com/weblog/2009/4/22/how_to_really_url_encode/