Added filewriter.d.ts and tests

filesystem.d.ts is dependent on filewriter.d.ts. I should have added filewriter.d.ts before filesystem.d.ts.