Fix passing args to script dispatch fails #1006

add test of the tool