Fix NoMethodError when outside of a repository
Fix NoMethodError when outside of a repository

In fixing:

  https://github.com/wincent/command-t/issues/108

I recently introduced a new bug, wherein people were seeing:

  Error detected while processing function commandt#CommandTShowFileFinder:
  NoMethodError: undefined method `chomp' for nil:NilClass

when trying to use Command-T outside of an SCM repo.

I had forgotten that `#nearest_ancestor` might return `nil`, which meant
that `@path` could end up being unset. I hadn't noticed because I am
pretty much always inside an SCM repo, or not using Command-T.

This commit fixes that by ensuring `@path` is always set. I was tempted
to leave a comment to the effect of `# nearest_ancestor may return nil`
but hopefully the location where I've placed the line makes this
semi-obvious. Hopefully... Seems this kind of bug wouldn't have happened
in a statically-typed language.

Thanks to @dymv for the initial report, @DanielFerguson for finding the
commit that introduced the breakage, @MichaelJosephKramer for pointing
out that the issue only occurs outside of SCM directories, and @nilbus
for confirming the issue.

Fixes:

  https://github.com/wincent/command-t/issues/109

supriyantomaftuh/command-t,simichaels/dotfiles,besarthoxhaj/command-t,lencioni/command-t,yrro/command-t,1234-/command-t,yrro/command-t,wincent/command-t,wincent/command-t,wincent/command-t,simichaels/dotfiles,1234-/command-t,vrkansagara/command-t,vrkansagara/command-t,mtimkovich/command-t,besarthoxhaj/command-t,mtimkovich/command-t,supriyantomaftuh/command-t,lencioni/command-t