Fix possible torrent duplication in add_torrent. Fix \r\n.