Fix can't modify frozen String

This is to fix error message when using Puppet 3.3.1 with Ruby 1.9.1
where the $name variable cannot be modified by is_domain_name fucntion