High resolution solar flare X-ray spectra - The temporal behavior of electron density, temperature, and emission measure for two class M flares