Adding __enter__ and __exit__ to use for "with" statements.