more versatile content == html check
More intelligent structure

* get head first, get the text only if it's html
* improved try-except catch clause
fixed syntax
okay, now it's fixed
Merge branch 'file-obj-url-improv'

Improved handling file object urls
(also bugfix for html docs content-type != 'text/html').