issue 597 - print full help only with explicit --help flag

The patch also fixes --version and --help to exit with 0 as an exit code and adds corresponding checks to tests.