Fixed a bug with uploading images with more than one period in the filename.