Add mode to json

Allow user to set mode on the file json-store creates/syncs (by default `NamedTemporaryFile` sets it to `0600`).