Fix handling of symlinks in custom hooks directory
Previously if there were symlinks in the custom hook directory pointing to a directory or some invalid executable, Gitaly would attempt to execute that file. This would result in a "permission denied" error because you can't execute a directory, for example.
We now resolve the symlinks and only execute them if they point to valid executables.
Closes #3282 (closed)
Edited by Stan Hu