Evaluation of the possible use of a CdTe detector for the characterization of diagnostic X-ray beams