-v or --version prints version and exits.

Fixes #829