added support for permissions checking when unlink/rmdir