BUG: close file-like objects returned by urlopen

Fix `ResourceWarning: unclosed file` on Python 3