Toggle dialog at a different time
Recapture the argument instead of just passing it into function
Manually reset focus state after opening dialog
Fix crash
Preserve whitespace in git path.

This fixes an error if Xcode is installed on a partition with a space in
it, because "which git" returns Xcode's bundled git.
Small refactoring
Merge pull request #479 from foldericon/patch-1

Preserve whitespace in git path.