Opens HTML files with PhantomJS and saves their DOM to a new file when certain criteria are met.