Fixed YamlFileLoader imports path

YamlFileLoader used the resource name as the current directory during import, which can cause a failed import when using a relative path. Using the $path variable output from the locator is consistent with other loaders and fixes the bug.
bug #10545 [DependencyInjection] Fixed YamlFileLoader imports path (jrnickell)

This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Fixed YamlFileLoader imports path

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10516
| License       | MIT
| Doc PR        | http://symfony.com/doc/current/book/service_container.html#importing-configuration-with-imports

YamlFileLoader used the resource name as the current directory during import, which can cause a failed import when using a relative path. Using the $path variable output from the locator is consistent with other loaders and fixes the bug.

Commits
-------

fd1d48b Fixed YamlFileLoader imports path