Updated to correct some "bad URL" errors that were being thrown

"bad URL" were being thrown when a space appeared in any part of the URL. [NSUrl URLWithString:] properly encodes the URI.