Fix dry-run option for main script and plugins