Use POSIX compliant test command in git hooks

Ubuntu systems will error out on `[[` in shell scripts with `#!/bin/sh`
as the shebang.