Replace yaml.dump with yaml.safe_dump
Replace yaml.dump with yaml.safe_dump

yaml.dump may fails with unicode error. Though we've not noticed
these issues, it's better to use safe_dump to avoid them.

Change-Id: I024ee0a0176e03d999bef99c76a66d00c204b1af

kevin-zhaoshuai/zun,kevin-zhaoshuai/zun,kevin-zhaoshuai/zun