Change isUrl regex to accept mixed case
#583 added tests for isUrl regex change.
Moved init of self.uri.pathname

Because the self.uri.pathname var has a default value that is used later in the method, there is no need to check if it is falsey. Just set the pathname to the default if it wasn't set by the user.
Merge pull request #613 from lexander/master

Fixes #583, moved initialization of self.uri.pathname