Handling of optional kwargs

There are some optional parameters that are accepted by all of the
LCAPI commands—this provides support for them.

Also includes better handling of the possible errors that may arise
when trying to connect to the WWT client.