The Thermodynamics of the Steady State