Fix the storage-test unit tests

The testDeleteAll() test exposed some bugs in the DeleteObject implementation. The test itself was also buggy though. This PR fixes both, and the other storage-test unit tests now pass too.