Add support for yml tree

This PR adds an option to export the YML like a tree. 
This feature is disabled by default.

#### Before
````yaml
foo.bar.baz: "foobar"
foo.bar.foo: "test"
foo.baz: "Bazbar"
````

#### After
````yaml
foo:
  bar:
    baz: "foobar"
    foo: "test"
  baz: "Bazbar"
````