Simplify memory freeing
Implement logging functions
Change printf()s to print_log()s
Add syslog support
Tidy usage message
Add support for logging to a file
Implement daemon mode
Exit if XBMC is no longer responding
Save loglevel along with every message in logfile
Log PID along with every message, both in logfile and syslog
Remove "- aborting" from error messages
Add support for writing PID to supplied pidfile
Add daemon mode information to README
Add some warnings for errors in processing repeating commands