Allow optional commas in between array items

For consistency and allowing for making diffing of config files neater,
a single trailing comma at the end of the array is also accepted.