Exit with a return code similarly as ack and grep.

0: Match found or help/version printed.
1: No match.
2: Error.

Also changed `main()` not to call `sys.exit()` but to return the rc.

Resolves #24.