cli,output: fix truncated array output when == 10 elements
The extra character size was only being applied when > 10 elements, leaving the == 10 case out of it, so the output was being truncated. Fix it, by using a more generic way to computing how many extra characters we need in the size.
Fixes #151 (closed)