MULE-8054: Adding check to make sure the folder is open before closing it.
Merge pull request #1192 from mulesoft/MULE-8054

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