fixed unbound variable causing "error writing to html tmp file"
removed hard-coded 'True' condition forcing always creation of html tmp file
provided option to enable writing scraped html to a tmp file

replaced root.cssselect('a img') with root.xpath('//img'), most likely equivalent but skips the cssselect requirement and avoids the 'cssselect seems not to be installed' error

changed 'if javascript' to 'if not javascript == None' to comply with lxml's warning: "FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead."