Ensure file handles are closed in setup.py

This ensures the file handles in `setup.py` are automatically closed.