There's surprisingly little support to create ~/.yourapp configuration directories; homeplate is the utility lib for working with those directories and saving configuration files into them easily.
Save will save the json marshal output of config into the file named ~/.dirname/configFilename.json
If overwrite is false, and the file exists, an error will be returned