Adds option to save session on exit.

Does this through the save_on_exit bool in the global.lua config.