applied patch from @tony
fixed reghtml to only look at href and src attributes and on both absolute and relative urls
added options.flatten boolean which converts ALL relative resources by chopping off all the "../" and replacing with with "/" essentially flattening the references.
added some useful log output