Tests & changes for dump-anydbm script

Python 2 & 3 testing using pytest on dump-anydbm.  Also some changes to dump-anydbm to improve consistency between python 2 & 3 processing of database contents.