Check if the local git hook exists before running it

References #327