error checking and other improvements

- added error checking to sleep and hibernation
- changed define from usesysfs to sysfs
- switched to #if defined() vs #ifdef
- added a little section for possible systemd based hibernation