Fix tokenizer.c on Windows; add another template test (#25)

Mostly by @gdooms, with tweaks.