Going to Mars won't save us from a gamma ray burst either. Not sure what you mean by red dwarf but I take it that you mean an event on the scale of a gamma ray burst. Mars ain't good enough for that.
I'd be curious to hear about events which would wipe out Earth and the moon but leave Mars intact.