Fix hook file discovery if the profile contains use:

The code for finding the hook file (if any) is moved into the
PackageYAML class which already encapsulates filesystem information.

This should fix https://github.com/hashdist/hashdist/issues/273