Promotion hopefuls Wrexham beat Mansfield Town 2-1 at Field Mill to make it three away wins in a row in League One.