Exit when footer output is complete.

In some cases, it's possible that, after the footer is rendered,
another page may be displayed.  This remedies that bug.

Fixes #2.