Wrong initialization of the script extraction algorithm

Right now, the script extraction fails if we have text before the first script tag (ex: `<html><title>foo</title><script>...`) because the algorithm thinks it is part of the script.

We should wait for the first script tag before extracting scripts. This changes some of the unit tests as well, but `--extract always` is basically the equivalent of saying that the input file is an html file (because it is treated like one).