Use ByteList length to end traversal while parsing out popen args.

Fixes #2047.