Implemented the remaining file I/O operations in filesystem.js.