Moving the bulk of the write* method hook into a separate method.

This new "writeCommand" method is public, and provides an alternate interface to writing IRC commands. Tests updated appropriately.