Load scripts in before_body_end.

This is what the documentation said it would do, but I hadn't. It was in
the head. Silly me.