Ensure the script runs when there are no images
Add missing slash to the image urls

They were previously being generated as ...amazonaws.comimages...,
rather than ...amazonaws.com/images...