Use random key/value pairs in tests; debug pdict code