backup tools bup, storeBackup: implement sanity check

refactor test case I wrote for storeBackup and apply to to bup, too