if output dir is None try using the ./drivers directory
    if it already exists, otherwise use the current working directory

def normalize_outputdir(outputdir=None):
    """ if output dir is None try using the ./drivers directory
    if it already exists, otherwise use the current working directory
    """
    normalized = ''
    cwd = os.getcwd()
    if not outputdir:
        outputdir_drivers = os.path.join(cwd, 'drivers')
        if os.path.isdir(outputdir_drivers):
            normalized = outputdir_drivers
        else:
            normalized = cwd
    else:
        normalized = os.path.join(cwd, os.path.normpath(outputdir))
    return normalized