fix bug EISDIR in lib/fs.fs