Make output path optional and use "-" (default) for stdout.

This eliminates the need for --dry-run.
Adds a validator, which behaves like a generator.