correct and optimize File constructor in nodejs environment (#1781)
correct and optimize File constructor in nodejs environment (#1781)

- remove b flag silently (this already matches how Node reads files)
- detect the encoding option using match?
- use sub instead of gsub to remove encoding option
- only sub if the encoding option is detected
- rename encoding flag to encoding option (per Ruby docs)
kachick/opal,opal/opal,iliabylich/opal,kachick/opal,kachick/opal,Mogztter/opal,Mogztter/opal,iliabylich/opal,opal/opal,opal/opal,opal/opal,kachick/opal,iliabylich/opal,Mogztter/opal,Mogztter/opal