Added decorator for retrying urllib2 connection plus tests.