Fixes "TypeError: Arguments to path.resolve must be strings" error when using node v0.10.0.
…kages with invalid names, #108
… fixes some issues with #112
If completeAuth is called with an authenticated url (e.g. `http://USERNAME:PASSWORD@myjamjs.com/jam`) it calls the callback with the original unparsed url however if the url requires authentication (e.g. `http://myjamjs.com/jam`) then it calls the callback with an already parsed url. In the case of the publish command this results in the calling doPublish with a url object.