Check through *all* script tags for the root url, not just the last one

We were seeing problems on, for example, blogspot, where the last script tag was actually a different script.  My guess is this has something to do with how scripts are loaded in parallel or something.  This also reflects how things are done in MathJax in exactly this sort of thing.
Merge branch 'master' of github.com:sagemath/sagecell