Added argparse support to the client script.

This looks better than the last attempt.
maybe set up the logger outside the function?