Fix git module checking out correct version after initial clone

Fixes #313
Cannot readlink() on a hard link