Maxwell's demon and the entropy cost of information