validates file upload as gif, jpg, or png