Saving capability

Hi Michael,

Here is a pull request to add a save capabilty to the client. The code could be optimized by removing redundant functions afterwards.

This is linked to mrash/fwknop#4

Let me know when you think you are ready with your other features so that I can supply a better patch to merge it easily if you think it deserves it.