Fix getting bundle path

$bundles array contains only classes, not objects, so we need to instantiate them before getting path.
In $resouces 'type' cannot be equal to $extension, because YmlFileLoader checks for 'yaml' as type, not 'yml'.