The problem with that reasoning is that the French colonists that have invaded both countries have long since been dead. Both Tunisia and Algeria have been independent for more than half a century now. Even if you put the bad history between these three countries into context, France has been keeping their hands off of colonialism for a very long time now. Why bother retaliating against a group of people that have virtually nothing to do with the actual conquerors and oppressors of the past?
By that logic, the Chinese and Koreans should be sending in spies and assassins to throw Japan into social and political chaos, because of the terrible history between each other.
"The sons must bear the sins of the father", or whatever the hell that quote was called.
I'm not exactly justifying the actions as much as I'm saying that they're a natural reaction that you can find in many heterogeneous populations. However, it is a fact that Muslim citizens of France (not just refugees) suffer from unemployment and other things at a higher proportion relative to native French, and it's easy to invent ideas of discrimination even where it doesn't exist. Until France either promotes a strong national identity inclusive of minority groups already within its borders, fixes their economy, or kicks out ethnic Algerians and Tunisians, these problems will continue to exist, because tribalism is a base element of the human psyche. (I personally would prefer it if they tried cutting back on socialist fat and became more economically productive if they try only one of the three.)
The least successful areas in the world are those with deep-seated concepts of identity conflict, e.g. the Balkans, where no group wipes out the other but simply engages in back-and-forth fighting for literal millennia along ethnic and religious lines. You can have diversity, but only if a nation's wealth is equal and great enough, and if the kind of diversity present isn't actually valued. For example, the Chinese and Japanese were treated horribly for much of their time in the USA, and in fact had less rights than even blacks did after the Civil War. In spite of that, Asian terrorism in America has never been particularly problematic. Many kept to themselves for a long time, and others happily embraced white cultural norms and names until they've reached a point where they're far more successful than whites themselves, and barely even thought about as a minority group in our country. China has dozens of various ethnic groups within its borders, but aside from recent uprisings by Muslims in the West, you don't really ever hear about riots and violence committed along ethnic lines. That's because the authoritarian state effectively squashed those concepts.
I'd use Japan as an argument in my favor; they're an extremely homogeneous and xenophobic nation, and if Donald Trump accomplished all of his immigration plans, he'd still be to the left of Japan on that issue. Their tiny Korean minority population is still discriminated against to this day, and Japan still denies most of its war crimes committed during WW2. I think human beings are used to being treated like cattle, and although it's not the most humane solution, if you keep them ignorant of their victimhood, they can't be motivated enough to rise up. This is why Communism is such an incredibly powerful and dangerous virus, because it makes people begin to think of themselves along class and identity, and promotes tribalism. It's not "spies and assassins" that are being sent into France; these are second, third, etc generation French-Algerians and French-Tunisians committing most of the Islamic crime in France. I think there's been maybe a couple Syrian refugees in the mix, but they're the minority.