[libvirt PATCH 09/19] commandhelper: Factor out printEnvironment