automaticaly create parent directories of output files