Ballistic bunching of photoinjected electron bunches with dielectric-lined waveguides