Fixed an issue with the testharness detection regex

If testharness + testharness report script tags were on the same line, the regex would greedily capture both, which would lead to a document without the testharness loaded.

This is to start working with document.write tests. Currently however, they all fail because we are not correctly handling document.write, especially if the script tag is in a \<head\> tag.