Use args.extras instead of ENV[names] for retrieving the names of the cookbooks.

Before rake cookbook:test name=cookbook1,cookbook2.
Now rake cookbook:test[cookbook1,cookbook2]