Make save_config sort JSON keys

We only want node files to change if something actually changes and
preferably in a predictable way. Sorting the json keys makes this much
more consistent.