implemented checkDirGroupAccessible function