Backport script/style node avoidance from KeyboardLeopard

I think that, when I originally wrote this script, I wasn't very familiar with the web development ecosystem, and believed that style and script nodes would not be found in a document's body.