Moved rebootstate package from reboot-machine
refactor checkForRebootState
Moved LockDir to this PR
remove dep
refactored rebootstate