Submodule support

Not sure how helpful this is to others, but I have a project with submodules and wanted to add a precommit hook to one of the submodules. This falls back to looking for the module hooks directory if it detects the .git link is a file and not a directory.