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.
OK, good idea. Could it impact speed to do this for every files call? I have this conversion where you noticed it below, and it's only needed in that one branch of the if statement, which is a very rare option that is only used once.