[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
I would not be surprised if one of the wacky "lets allow hyphens" versions also allowed a hyphen last...