Attempted fix for issue#25

I updated the template to loop through the hash keys rather then
create the YAML from the hash, the to_yaml method was all kinds of
unhelpful, although it does seem to be a nicer way to do this.

I didn't have much luck with getting the to_yaml method options
working the way I wanted, so fell back to this method.
Merge pull request #44 from tfhartmann/issue25

Attempted fix for issue#25