BUGFIX: call disable_kernel_write() in case of a failure
Reported by Marky (https://github.com/ykram).
Add Yosemite support.
Mostly based on pull request by Tyilo (https://github.com/Tyilo/).
Cleanup and improve some of the code.
Cleanups