Short circuit isGit logic to ensure .git exists

Otherwise it's just spawning a wasteful git process... Courtesy of @tj90241
Change pushd and popd to cd
Add snap helper function