MULE-8054: Adding check to make sure the folder is open before closing i...

...t.
you introduced repeated code again.

private void handleFolderException(String operation, Exception e) {