Add the ability to give a different template for the last entry.  This allows JSON style structures to be handled correctly, as the last line in a list for strict JSON validation requires that no comma be appended.