Fix #432 isdirectory() need full path when checking the kind for a candidate