Fix spider.absolutePath() to correcty trim the query string

also update tests to ensure that this works.