Fix submodule checkout mistakes

- The test for submodules was both unextended and unquoted.
- GIT_DIR needs GIT_WORK_TREE specified in tandem - better to just
  change directory.
- `git clone` uses links when cloning from the local filesystem;
  `--depth` is meaningless.
- `git clone -b` only takes branch references, not commit names.
  You must clone, then checkout to check out a specific commit.
Do git submodule stuff in a silent subshell