Handle templates for 0 and 1 classifier/dependency properly.

Closes oddshocks/pythong #14

* ALWAYS end lines in a list with commas.
* Handling empty lists correctly
* Removing leading/trailing whitespace