Small fixups while learning ZODB

While learning ZODB I've found a couple of scripts that were not working. The fixes are here.

Please apply and thanks beforehand,
Kirill