Improve vendor regex for third party folders

This PR should improve the regular expression used for third party directories as discussed in #1409.