Fixed daily_summary unit test.
- Mainly by copying over, from branch `master`, the technique of putting
  output in a temporary directory.
- Also required some fixes to other bits of apptest.  Those fixes, moved over
  to master branch, may solve a few (but not all) problems there as well.