Fixed: Cannot set the folder's path.

We cannot set the new path for the IMAP core folder. I see that there is a bug in your code so I send this pull request for this fix.