That macro (and {{set item}} as well) was not created to be used by users, but by templates, inside the [special:import] section.
If you mean to make it usable by users, it should be discussed HOW before.
Anyhow, I would not duplicate features of {{set item}} in {{add folder}}.