Fix bug in code to set working dir in vim 7.0

:h filename modifier, which gets the head of the current working file,
returns an empty string for files in the current directory in vim
version 7.0. Later versions return "."