Completion fix when file in Java working directory has same name as token

Steps to reproduce:

Example of directory structure:

homedir/file
homedir/dir1/file2

1. Run application from "homedir" directory
2. Change directory to "drectory1"
3. Input "file<TAB>" and "filefile2" is completed

Test case included.