MB-100: Add additional two fixes for couchbase-cli

Change-Id: I31ad97f9dc94588f9cc5bd9c442d21730c4d6b8a
Reviewed-on: http://review.couchbase.org/43964
Reviewed-by: Wayne Siu <waynesiu88@gmail.com>
Tested-by: Wayne Siu <waynesiu88@gmail.com>