Avoiding URI.join, its semantics a little confusing.  For example:
URI.join("http://a.com/blah","index.html") => http://a.com/index.html
URI.join("http://a.com/blah/","index.html") => http://a.com/blah/index.html