Handle URI parse errors

* When URI parsing fails on what looks like a full URI then
site_has_hosts? should return false
* In tests distinguish between invalid and incorrect