TRUNK-2651:Ugly stacktrace when trying to upload a non-image file as a complex obs with the ImageHandler

https://tickets.openmrs.org/browse/TRUNK-2651