rework dump_data() to keep an internal buffer
rework dump_data() to keep an internal buffer

and only fprintf() once

akgood/yubico-piv-tool,Yubico/yubico-piv-tool,Yubico/yubico-piv-tool,akgood/yubico-piv-tool,akgood/yubico-piv-tool,Yubico/yubico-piv-tool,akgood/yubico-piv-tool