Detect existing folders in IMAP accounts correctly