Creates the directory for the output file if it doesn't exist yet.

Removes some of the friction when specifying an output directory. This is specially important when the output is different than the dev dir and we're not committing the output (and don't like `.gitkeep` files).