The context manager protocol requires that __exit__ be called with three
args: type, value, and traceback. In some places, we didn't include any
args at all, leading to test failures during clean-up.
Change-Id: I2998830e6eac685b1f753937d12cf5346a4eb081