Add optional save-on-change support. Fixes #14.