Build the URL with Ruby's URI class.

Also add RDoc.