Complete issue #199

In Database.expandStoredJSONIntoRevisionWithAttachments(), ensure that
json has data before appending extra information to it.