Use yaml.safe_dump instead of yaml.dump

After changing to use yaml.safe_load, some of the tests are failing
locally with unicode error. Though we've not noticed these issues
at the gate, it's better to use safe_dump to avoid them.

Change-Id: I84cf921afe76b3bed44e84230a71b244bb886cce
Closes-Bug: #1547399
diff --git a/functional/test_hooks.py b/functional/test_hooks.py
index d9ebd44..bafb0ef 100644
--- a/functional/test_hooks.py
+++ b/functional/test_hooks.py
@@ -191,7 +191,7 @@
                          res_after.physical_resource_id)
 
     def test_hook_pre_create_nested(self):
-        files = {'nested.yaml': yaml.dump(self.template)}
+        files = {'nested.yaml': yaml.safe_dump(self.template)}
         env = {'resource_registry':
                {'resources':
                 {'nested':