fix issue #8171 on configuration tree for twig extension -- pairing up with @cordoval
added regression test
bug #9719 [TwigBundle] fix configuration tree for paths (mdavis1982, cordoval)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #9719).

Discussion
----------

[TwigBundle] fix configuration tree for paths

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8171
| License       | MIT
| Doc PR        | na

This is a joint effort with @mdavis1982 and @cordoval :baby: pairing up and warming for hacking day in Warsaw

Commits
-------

9aa88e4 added regression test
4201d41 fix issue #8171 on configuration tree for twig extension -- pairing up with @cordoval