'roledb.py' and 'keydb.py' updated following unit testing and review.  'test_roledb.py' and 'test_keydb.py' added.