(#294) Fix missing hyphen in tag name

Hyphen is allowed in tag names, but was being stripped by a broken
regular expression. It needs escaping to be treated literally.

This fixes #294.
Merge pull request #308 from tdb/bug/master/294-fix-hypen-in-tag-name

(#294) Fix missing hyphen in tag name