Implement a basic javascript FileManager