Issue #31: Add persist_dir config/cli flag and support for retain: true|false in plugin modules.