t/zbd: improve error handling for test scripts