CBLT-316:  fix up exit conditions

Change-Id: I3609eab2c591e2bc1fd1e79489bdd0e0896e72a7
Reviewed-on: http://review.couchbase.org/38058
Reviewed-by: Philip Labee <philip@couchbase.com>
Tested-by: Philip Labee <philip@couchbase.com>