Implement exit codes
Add test for exitcodes
Adjust other tests

Test searches that shouldn't produce results now need "[1]" as expected
output to catch the non-zero exit code.
Merge pull request #461 from luksen/exitcodes

Exitcodes