jeetsukumaran/DendroPy — pull request #10 by mgymrek (2014-03-10 17:56:59+00:00)
Title: closing temp files made by tempfile.mkstemp

I have code running hundreds of simulations that use ```dendropy.interop.paup.estimate_tree```. Each time ```tempfile.mkstemp``` gets called the number of file handles open increases, eventually reaching the limit of allowed file handles.

The Paup module opens temporary files using mkstemp. According to [here](http://docs.python.org/2/library/tempfile.html#tempfile.mkstemp), the user of ```tempfile.mkstemp``` needs to delete the temporary file when done, which doesn't seem to be happening.

I added ```os.close(output_tree_file_handle)``` wherever one of these temp files was created, which solved this problem.