Fixes #32 - write the die() function to the generated run script, and also adds a few comments to the docs

Gah, no matter what I do, I can't get Github to let me do a pull request against anything other than my head revision. (I wonder if this is a bug from the redesign, or if I'm just an idiot. The docs seem to think it should work just fine)

In any case, this should be two separate pull requests (the first, fixing #32 should be pretty uncontroversial), but if you're happy to just accept both parts as is, then I won't bother trying to rectify it.