Fixed log closing

Added a close method to the log object which will close out the syslog
cleanly.  There could be problems if there are any attempts to log
anything after the close, but that should only happen on program
termination, and none of the subsequent code should try to log anything.