make dirs before trying to write config files to them.