Improve autocompletion of paths, in particular when involving subdirectories