Uk biscuit maker Thomas Tunnock has reached an agreement with its workers union over an ongoing pay dispute.