Eased url validation

Removed requirement for tld so `localhost` passes. This patch also has the great benefit of allowing ip addresses directly.