Further error checking in image rehoster.
Remove unnecessary temp file.