Fixed invisible bug caused by fs methods being relative to cwd(). Dunno how to test it