fs: throw more errors in JS land
Refs: https://github.com/nodejs/node/issues/18106
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
fs