Fixes for fortunes test.

Fixes a missing fortune test, and some other small improvements. Fixes #728.