Implementation of ext- and file-specific hooks

There may be a bug with file-specific hook files that aren't in the current
working directory. Not sure if we need to strip of the leading parts of the
path in order to get just the filename itself.