Create output directory if missing

The script fails the first time it is run, because it cannot find the output directory. This fixes the problem creating the directory if missing.

@YolinaS + @maxfliri