Use a nested context manager, instead of contextlib.nested

I didn't realize that conda itself doesn't need to support Python 2.6.