Add logic so that documents can also be selected with the doc command.
Add the print and save commands.

Allow tilde expansion when saving files.
Change and document the handling of exit commands when saving a file,
closes #11.