Google Spreadsheet script not being executed when a new record is added to it