Fix hanging comma on some cookbook versions.
(array order between gems and cookbooks is inverted, which
required a change to the version rendering logic.)