Clean up setup

Looks like I never actually enabled the `--setup` switch, or tested it. This patch fixes that, wrapping up #206.

This also fixes #803 (protecting task I/O from the setup wrapper) and #810 (setup/bootstrap failing fast on errors), with appropriate tests.

I think this is the last pull request we'll need for v0.4.2 (still need to update CHANGES.txt and other administrivia).