read_file_or_url: raise UrlError with 404 on ENOENT

This makes it easier to call read_file_or_url and handle file or url
errors.  Now read_file_or_url will raise a UrlError in either case
on errors.