Ensure modified date is set in all scenarios we'd want it set.

This now includes when the object is being replaced, or modified date is just missing but does exist on the object.
Merge pull request #29 from isaacgrant/modified-date-saving-robustification

Ensure modified date is set in all scenarios we'd want it set.