Add clean up in BAT tests.