Fix ensure_maildir
Merge #286: Fix ensure_maildir