Updated the calling method to upgrade the read/write lock and added a do...

...uble-check to make sure that a dynamic class is not already added to the dictionary.

This implements functionality requested by Issue #119.