Automatically save on exit if config is modified

* Closes #22