Implement Environment.__enter__/__exit__. Closes #54