Deposing and prosecuting the Syrian leadership will increase the number of terrorists in the world, not decrease it. Just look at what eliminating Saddam did for Iraq. Deposing Assad will replace a butcher with... what, exactly? A myriad of warring religious and ethnic factions with no central authority where organizations like Al-Qaeda and ISIL thrive. Take a good look at the Syrian rebel factions and tell me which one is capable of ruling a united Syria and isn't even worse than Assad.
After you depose and prosecute Assad then just watch the refugees flood in as Syria completely disintegrates.
Most of the current arrivals in Europe from the middle east aren't refugees in any case. They're economic migrants.