Fix incorrect insertion of toolbar when there are duplicate body tags.

Insert the toolbar after the last close body tag, not the first. This
solves issues where script tags with sub-pages could cause the toolbar
to fail.

Fixes #117