best effort to avoid corrupting prefs.json
best effort to avoid corrupting prefs.json

When writing preferences to disk:
* write to prefs.json1
* delete prefs.json
* rename prefs.json1 as prefs.json

Dyalog/ride,Dyalog/ride,Dyalog/ride,Dyalog/ride