Some dir ensure / file security checks