Measurement of the Cross Section for Direct-Photon Production in Association with a Heavy Quark in p p-bar Collisions at sqrt(s)=1.96 TeV