Fix range exception on empty query string

When a URL with a empty query string (ex: http://domain.com?) was passed to
canonicalURL a range exception was thrown due to rangeOfString: returning
{NSNotFound, 0}
Merge pull request #29 from danielrhammond/master

Fix range exception on empty query string