Factor out almost all fs. and path. calls in the tool

This will be useful when we want to be smart with windows file paths later
Also, all of the file calls are asynchronous with fibers now, which comes with
many benefits.
I am not sure that we need it to be 100% exhaustive - basically if a fs call you need is not already wrapped you can wrap it before using it?

The easy check to see if we wrapped everything correctly is to disallow `require("fs")` in all files except this one. After this commit, we're almost there except for some edge cases.