correctly get the uri base

the query string was not being accounted for when getting the base, thus urls with a query string were not being returned correctly.
add a test for spider::getUriBase()