[Reviewer: Andy] Make return code reflect success/failure.

Hi Andy - please can you review. This makes the test return an exit code, so I can tell if it passed. Thanks.