Ensure the stream is closed at the end

Too bad the read-lines method from clojure.contrib.io isn't available anymore.