Add dump and restore commands.
Add dump and restore test case.
Simplify dump and restore test case - works with Python 3.x now.
Merge pull request #365 from JustinHead/master

Add dump and restore commands.