Updated autoclose to work correctly for iterators.  Fixes #110.