Handle IEnumerable<int> parameter

WriteEnumeration would use Square braces instead of Curly braces, in comparison WriteArray always uses Curly braces.
I've changed WriteEnumeration to always use Curly to match.

Not 100% sure if this is the right fix, but works for this case. I've added a test.
Fixes #222