Ignore alternate if its not a git repo

Don't just check if the submodule folder exist, since that doesn't
qualify it for being a valid git repo.

Change-Id: Ia3902714a0554908c0b8fd3228ed6fc2cfddd344
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>