Implenent file_save and file_save_as

This allows us to do the right thing at exit (and also connects to more of
the menu actions to actually do something).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>