fixed issue where newly created directories are 777 instead of 665