Rangers remain 22 points clear at the top of the Scottish Third Division after a 3-1 fightback win at Berwick.