Update imagesize.py

Add "close file"