slapos.grid.promise: fixup! prevent json file corruption while updating data

This is a fixup of d42de18b.
3 jobs for master in 0 seconds
Status Job ID Name Coverage
  External
failed SlapOS-Master.UnitTest-Master

02:26:22

failed SlapOS.Eggs.UnitTest-Master.Python2

00:20:24

failed SlapOS.Eggs.UnitTest-Master.Python3

00:18:38