Fixes write permissions on some dirs