Make changelog work as expected

- Fix tiny bug in templates
- Compare to previous mod, not to current content (if possible)
- Do not break history when performing revert