Fix assorted bugs in packaging.util.cfg_to_args (#11595).

Original patch by Erik Bray.
4 files changed