fixing updateOrCreate method

I found that this method was improperly trying to forEach an object, and calling back with invalid data, or potentially throwing errors.

The following iterates the keys, and uses returnVals to send back the updated object, which jugglingdb expects.