[config:export] simplify the creation of the target directory (#3054)
[config:export] simplify the creation of the target directory (#3054)

The $directory variable is a loop invariant, there is no need to try to
create the directory for each configuration entry, so move the creation
of the target directory out of the loop.

While at it move it also before the $tar conditional block, in this way
the same code will be used whether --tar has been used or not.
revagomes/DrupalConsole,revagomes/DrupalConsole,revagomes/DrupalConsole