Url-encode arguments and parameters for endpoints

This allows retrieving data for tags using non-latin characters (currently
Instagram will return an error with un-encoded strings).

Adds a sprintf-style function that urlencodes it's arguments. Also urlencodes
query string parameters.