Add tool/add_mode.js for creating stub files for a new mode