Fixed handling of spaces in folder selection.

This was breaking the ability to select any IMAP folder with spaces in it, like [Gmail]All Mail