More robust task deletion

use `%r` instead of manually escaping the quotes