This commit updates the backup command to prune old backups.
This commit moves a huge chunk of the code to go. The TODO.md document indicates what is left to be done.