Reworked Model::save() to be safer.