Fix record corruption bug

This fixes issue #90 by fixing a bug that was causing records to be corrupted if addMetadata was called with an empty map.  The call to mongo is no longer made if the map is empty.