Handle saving of multiple images in array

Previously multiple images in a media entity were
causing filename conflicts. I modified code such
that all files in the multiple images array are
saved.