Python 3 fix for test_persistent_dict