replaced urllib.request.retrieve with urlopen & copyfileobj

This was done because according to the python documentation urllib.request.retrieve is a legacy interfaec and may become deprecated in the future