Function to create a directory for the specified output file path if needed. Does nothing if the target directory already exists.
Function to create a directory for the specified output file path if needed. Does nothing if the target directory already exists.