Use makedirs to create config directory

This prevents an error if intermediate directories need to be created/