Fix bug with [File] being shown instead of [Dir]

This is for filename completion in the case of C-family include completion. The
path was being assembled incorrectly so os.isdir() was getting the wrong path
and then could not see was it a directory.