The non-isothermal spreading of a thin drop on a heated or cooled horizontal substrate