[PE-6474] This fix adds support for classes with hyphens in the name.

This will enable full compatibiity with Puppet 3.x, which still allows
classes to have hyphens in the names
This will allow trailing hyphens. Is that legal?