Added utilities.write_pid_to_file and implemented in CGS servers. Also set stdout to unbuffered by servers and tidied up exception error handling
Now tries to create ThreadedXMLRPCServer to avoid any init processing if port is already in use