Read as root

We needed a function that could escalate privileges to root and then be able to read a file.
I would prefer if you updated this (and actually the RemoveFileAsRoot as well) to use RAII for resetting the file permissions. 

Please see the machineID that you worked on. John is using shared_ptr to do a custom action once it goes out of scope.