[core] Check if running with root privileges

* If running as root, print an error message and exit. This check will
not work on Windows.
Merge pull request #495 from Erethon/feature-check-root

[core] Check if running with root privileges