[ticket/12825] Better sniff for the extensions and skip the vendor/ directory

PHPBB3-12825