Add basic backup functionality.

Backup currently doesn't handle edge cases or produce a log file.
Add unittest for backup functionality.