tests/tools/examples: Replace direct exit() calls by return.