Added better error handling for image upload following some craziness, and added border support for images.