eproject detection and buffer handling fixes

Fixes regarding how eproject detects given project and some additional fixes for buffer-file-name related problems.