Fix random file reads for non-windows line endings