Set the working directory to /

Issue #6.
Set the root directory to /

Issue #6.
Define ROOT_UID constant

Issue #6.
Set the file creation mask to 0

Issue #6.
Annotate main method

Issue #6.
Re-order functions
Close all open file descriptors

Issue #6.
Detach process context earlier

Issue #6.
Use a logfile for stdout and stderr

Issue #6.
Use /dev/null for stdin

Issue #6.
Define init_daemon() function

Issue #6.
Move exit_if_not_root_permissions() func
Define stdout and stderr as global variables

Issue #6.
Add close_daemon() hook

Issue #6.