Fix sync tests not running
Convert insert + replace cmds to use db
Remove unused save-file-to-db cmd