added 'rb' model to open - PIL.Image.open() requires it
deleted img.close() - close() isn't supported on PIL.Image
"/".join() instead of os.path.join() for urls