code: def check_script(path)
        binary=path.split(' ')[0]
        raise "#{path} does not exist" unless File.exist? binary
        raise "#{path} is not executable" unless File.executable? binary
        path
      end
docs: Do additional sanity checking on a hook script