Installing insulation and ventilation under a new roof can solve heat-loss problems and prevent ice dams.