TemplateFile task does not recognize dots or dashes as part of tokens

I can define TaskItems with ItemSpec property set to "Template.Item.With.Dots", but the TemplateFile does not replace the tokens "${Template.Item.With.Dots}" with the replacement value. This change allows token names containing any character (except }).