Added ContentStore.replaceContent(osd, file, repository) as a safer method to replace an object's content.
Changed osd.getId to osd.myId to fix build issues in Cinnamon module.

getId() is generated by GORM, which seems to be missing during publish-plugin step.