Make sure files are closed so this runs on Pythons without reference counting.
Merge pull request #2 from alex/patch-1

Make sure files are closed so this runs on Pythons without reference counting