[in progress] `-l` is broken for long commands in the dash shell - fix it.

See issue #223.

This is in progress - this shouldn't actually fix anything, but I cleaned it up a bit so far.