Print version number for --version.
Moved error checking for command line options around.
Merge pull request #304 from Microsoft/likeaversion

Print version number for --version.