Only change "modified" counter on successful save

The modified counter in the CMS module (the red box in the sidebar)
always changes when saving, even when an error is returned.

This fix will only change the "modified" counter in the CMS module on a
successful change.
Merge pull request #175 from erJasp/master

Only change "modified" counter on successful save