More defense against lost commands: process input until all read bytes are exhausted. Fixes gh-27

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>