Refactor code not to use ruby-warc, start attempts at own impl