Fixed auth_token on media.

Added unit tests that ensure Media appends auth tokens to urls.
Also fixed the ping functionality so the app now actually retrieves a token.
Also enhanced $url so that it converts QSPs into ruby friendly casing.