def dir_maker(path):
directory = os.path.dirname(path)<EOL>if directory != '<STR_LIT>' and not os.path.isdir(directory):<EOL><INDENT>try:<EOL><INDENT>os.makedirs(directory)<EOL><DEDENT>except OSError as e:<EOL><INDENT>sys.exit('<STR_LIT>'.format(e))<EOL><DEDENT><DEDENT>
Create a directory if it does not exist.