Switched __del__ to close; this was causing problems with pythons setup.py test