Only generate posts that were updated recently.

- Some tests cleanup. Apparently when you fail a test, the teardown
functions are not called. So I’ve moved them into deferred functions.