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

https://tracker.phpbb.com/browse/PHPBB3-12825

PHPBB3-12825