Attempt to fix broken insertion of JavaCript in
\Bolt\Extensions::insertAfterJs()
In an extension, calling the following causes the passed JS to be
inserted inside the last <script></script> block:
$this->insertSnippet(SnippetLocation::END_OF_BODY, $js );

And example of this is enableing the Google Analytics and RateIt
extensions, the RateIt code will be inserted inside the GA script block
(assuming Google Analytics is listed before RateIt in the
'enabled_extensions' config parameter)
Amended with change suggested by Bob.
Merge pull request #981 from GawainLynch/hostfixes/RegExFix

Attempt to fix broken insertion of JavaScript in extensions