Cosmological solutions, a new wick-rotation, and the first law of thermodynamics