Yes. `mode` is complicated. I doubt that your logic below handles all of these cases: http://nodejs.org/api/fs.html#fs_fs_open_path_flags_mode_callback

I distilled that complex logic into a few checks you can do using the helper functions. The file mode class is defined here:
https://github.com/jvilk/BrowserFS/blob/master/src/core/node_fs.coffee#L988