Fix folder type heuristics in IMAP