updated file to PEP 8, as editor was complaining, and tabs are generally bad
removed the string splicing and replaced with one clear assert statement based on the script output for each test. simplifies and clarifies the test
changed file creation and deletion to use temporaryfile.  Still needed to use os to delete the 'extra' files that ndbm & dumbdbm created.  Also did not explicitly state the file name in checking the output statements, as now they are random everytime.