change dir perm from 0777 to 0755 in CreateDirIfNotExists()