def sanitise(string, replacements={'_' : '-'}):
    """
    Substitute characters that are used as separators in the pathname and other
    special characters if required
    """
    for c in replacements:
        string = string.replace(c, replacements[c])

    return string