ON THE MEASURE-THEORETIC FOUNDATIONS OF THE SECOND LAW OF THERMODYNAMICS