Write fix for failing restore test + crash bug
Write fix for failing restore test + crash bug

- ensure empty objects are not attempted to be written to the DB in the restore process

WorldBrain/WebMemex,WorldBrain/WebMemex