Add ability to dump and restore database

Use `./dump_database` to save the current version of the database to database_dumps/BACKUP
USe `./restore_database` to load the backup back into the database.

This currently runs the whole DB through memory instead of writing files as it goes because I was having trouble getting it to load the file again when working in `open('filename', 'a')`. This is probably programmer error rather than a bug. The learned @calpaterson can probably fix it.