`haltDir' feature, some fixes, and a minor improvement

The main change here is to add the `haltDir' feature.  It is useful for
temporarily disabling a job.

There are also some fixes, and a minor improvement.

Of course, all changes in this pull request are cleanly separated out
into distinct commits.