Fixes #2. Will create the hooks directory if it does not exist.