def get_not_repeated_file_name(path_with_file):
    directory, file_name = os.path.split(path_with_file)
    file_rename = file_name
    while os.path.exists(directory+"/"+file_rename):
        file_rename = "_"+file_rename
    return directory+"/"+file_rename
Returns file_name if file_name does not exist. If it exists, it appends an underscore until 
dataset/ETHPy150Open victor-gil-sepulveda/pyProCT/pyproct/tools/scriptTools.py/get_not_repeated_file_name