fix isdir/isfile