Direct measurement of the resonance strengths and branching ratios of low-energy (p, γ) reactions on Mg isotopes *