path: search for package folders only if they containg package.mk file

it's much more universal way as it was before
fixes issues in PR #3510