gitfs: attach to gitfs remote cachedir if present

This commit makes Salt check for the repository before attempting to
initialize it.
Merge pull request #9941 from terminalmage/0.17

gitfs: attach to gitfs remote cachedir if present (0.17 branch)