Split out postprocess+commit to separate script

As this logic is of most interest to potential other consumers; it's
not entangled with yum for example.