Use dynamic allocation for attribute bit formatting.

This is purely defensive.
Exclude overflow in allocator via a different approach.

Should be impossible anyway, but this way is more obvious to
readers and analysers.
sftpclient: more conservative approach to cmd_overlap
Eliminate a possible fd leak in the test client
Memory management pedantry.