properly encode YAML via YAML::XS