Adding .gitignore with node_modules in it to allow typescript.
Trying to simplify fs again.
More ideas on modelling filesystem.
Gave up on generic approach and going with TS/CodeMirror marriage again.