The script did not originally support chunked transfer encoding which Twitch seemed to use even when requesting HTTP/1.0; this resulted in corrupt files. If you grab and replace the sockread event from github it should work again.
If that is not the case, you need to find the line it's failing at and come up with a reproducible example.