shlib.sh: is_git_dir: tolerate symref without space