add isDirectory
fix isDirectory tests