After LocalState writes to a state file, we will refresh off the new state file rather than the original Path argument.
Add the LockUnlock methods to LocalState and BackupState. The implementation for LocalState will be platform specific. We will use OS-native locking on the state files, speficially locking whichever state file we intend to write to.