Added __del__ to close file objects to prevent warnings in Py 3.2.