Save only if editor is dirty, content has changed. Fixes #1