Fixed download Content-Length bug on Ruby 1.8

Really fixes #3. Enables some integration tests on 1.8 to catch problems
like this in the future.