Fix invalid DIR parameter passed to `read-file-name'

The filename of the current buffer (instead of the dirname) was passed
as DIR parameter), resulting in an invalid directory where emacs starts
completion.

Also ensure that the project file exists.
Merge pull request #441 from juergenhoetzel/master

Fix invalid DIR parameter passed to `read-file-name'