Set correct path for created dir

Previously it only used `output` option, but i also use `root`, that is why this bug appeared.