Fixed directory read permissions check