Clear folder cache before updating permissions

- Add function call to clear cache folder cache before the folder
permissions are updated.