AX_SUBMODULE: only check submodule status in git repository
Commit
5bd2d70c3d (AX_SUBMODULE: allow .git file in submodule,
Wed Dec 4 16:03:53 2013 +0100) changed the way an initialized
submodule is detected, but it did so in a way that can only
be applied when the toplevel is a git repository.
Applied it outside a git repository does not affect the outcome,
but it does result in the error message
"fatal: Not a git repository (or any of the parent directories): .git".
Only perform this check after checking that the toplevel is a git repository.
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>