Die if setreuid fails

Commit 4b8b1cb added a call to setreuid to drop root privileges before opening a certain file. According to [setreuid(2)] calling setreuid may fail, which would actually lead to us opening that file as root. I added a check to make sure it succeeds, and if it doesn't, then call die.

[setreuid(2)]: http://man7.org/linux/man-pages/man2/setreuid.2.html