[Backport of r56382]
Avoid exception if there's a stray directory inside a Maildir folder.

The Maildir specification doesn't seem to say anything about this
situation, and it can happen if you're keeping a Maildir mailbox in
Subversion (.svn directories) or some similar system.  The patch just
ignores directories in the cur/, new/, tmp/ folders.
diff --git a/Misc/NEWS b/Misc/NEWS
index 91e5843..e88fb2a 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -45,6 +45,9 @@
 - Fix bug in marshal where bad data would cause a segfault due to
   lack of an infinite recursion check.
 
+- mailbox.py: Ignore stray directories found in Maildir's cur/new/tmp
+  subdirectories.
+
 - HTML-escape the plain traceback in cgitb's HTML output, to prevent
   the traceback inadvertently or maliciously closing the comment and
   injecting HTML into the error page.