You don't need to strip the CRLF - it's implied by ReadLine(), but is not actually present.

This sort of loop will catenate 5 lines:
Code:

$sIn=ReadLine($fdInputFile)
While Not @ERROR
$iLineCount=$iLineCount+1
$sOut=$sOut+',"'+$sIn+'"'
If Not ($iLineCount mod 5) SubStr($sOut,2)+@CRLF $sOut="" EndIf
$sIn=ReadLine($fdInputFile)
Loop