Measurement of the cross section for direct-photon production in association with a heavy quark in pp̄ collisions at √s=1.96 TeV