Given we already use the addressable gem, I think we should be using it to generate uris and determine if URIs are relative or absolute in all this functionality.