Implement sdb diff (-d), fix save-sync and add shell tests