remember correct base uri when being redirected

If the supplied URL results in an HTTP redirect, the relative path logic needs to know about this new target location.  Includes updated test case