fix bug 1087163 - path may be a str or list, only return first element i...

...f the latter