url_is_valid function

Test whether a URL is valid