Terrorism will be rooted out: Karzai