Barnsley defender Tom Kennedy has signed a new two-year deal with the club