[core] Check if running with root privileges

* If running as root, print an error message and exit. This check will
not work on Windows.
* Added option -f/--force to override the above setting.