add fix for file and dir permissions
make permission updates optional