tg.sh: implement full GIT_ALTERNATE_OBJECT_DIRECTORIES quoting rule