(PUP-1527) After upgrade from 3.3.2-1 to 3.4.2-1 naginator fails to crea...

After upgrade from 3.3.2-1 to 3.4.2-1 naginator fails to create config from exported resources taken from hiera

Some changes introduced in hiera around 3.4 resulted in type coercion from strings
to FixNums when creating exported resources that were partially built from hiera data.

This patch ensures that any non-array parameter passed through the Nagios::Base.to_s 
method is a string before trying to run the .sub method on it.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.