git: use [[ ]] for bash tests
git: fix error output when no Dockerfile exists