Better hooks dir detection