An analysis of the Reich and Stivala algorithm for determining the reaction mechanism from TG data