Make escaping compatible with Puppet 2.7.13 and 3.2

The way that shell escaping works in Puppet has changed
in the version 2.7.14.

This commit adjusts the Puppet code that it will be compatible
with all versions > 2.7.x.
Merge pull request #39 from bodepd/fix_char_escapes

Make escaping compatible with Puppet 2.7.13 and 3.2