I haven't had a close look at how this actually works, but two things come to mind: 
1. lib/ and libs/ is confusing
2. Can this be "dependencies" based rather than pure "file" based, eliminating the cumbersome excludes?