Make script work with empty IMAP folders.