Added elasticsearch script file (rex.js) to work with rex script call.