Make sure urllib2 connection is always closed