make app.is_git_controlled() cheaper

dont try every time if the .git directory exists, instead remember the
result of the first call and return that next time.