Switched to using Addressable for URI parsing due to issues with hostnames that contain underscores.

Cf. http://www.cloudspace.com/blog/2009/05/26/replacing-rubys-uri-with-addressable/