More tests, and fix the deficits they uncovered

Some more tests reading the example emails from t/test-mails/, and fix the problems that those tests revealed.