require_dir(directory)
filename = os.path.join(directory, 'stackoverflow.html')
if not os.path.exists(filename):
    urllib.request.urlretrieve('http://stackoverflow.com', filename)
Downloading an image, want to save to folder, check if file exists