Add configurable permissions for files, directories. bug fixes

Add configurable permissions for files, directories. bug fixes