An analysis of the heat-pulse method for thermal-transport measurements of thin films