fs: Throw early on invalid encoding args
fs: Throw early on invalid encoding args

Re #3918

dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node