Move test teardown into `ensure` block.

cc @senny