The former first minister is awarded £512,250 from the Scottish government over a court battle.