More reliable checking for pgtap