Take relative base URIs into account

For example, when installing to a sub-uri with Passenger.
Merge pull request #452 from jasonmk/patch-1

Take relative base URIs into account