Correctly fix testing lengh over an empty array.
Test the target hooks dir instead of the source one.