config: fix error when saving the config for the first time
When the user configuration directory does not exist yet, chmod will
error out with chmod: cannot access <DIR>: No such file or directory
preventing the save of the configuration.
Fixes #127 (closed)
Edited by Massimiliano Torromeo