Fix isDir()

Change $dir or $current