Fix cd error when root dir cannot be guessed.

Before this commit, if the root directory cannot be guessed, we return
the directory of a file if it's readable or the complete file if it is
not.

We should be returning the directory of the file if it is a file
(readable or not) or the full path if it is a directory. Failure to
do so results in errors when doing ProjectRootCd in virtual buffers
(such as BufExplorer or Tagbar) or unsaved files. This is particularly
troublesome with an 'au BufEnter'.

Example error:
Cannot find directory "/etc/nginx/sites-available/[BufExplorer]"