Improved resolution of relative paths - much simpler.
More robust handling of bad URL's. Fixed bug in searching url for domain.