fix handling host:port command line args

The host argument used to work only when it was the sole argument,
thus failing to work when port number was provided.