urlParser.resolve requires urls to be strings

In some instances the url or this.options.baseUrl are objects or null, this protects against url.js from throwing an error.
Merge pull request #16 from ambirex/patch-1

urlParser.resolve requires urls to be strings