def versioned(fname):
    """ Function to convert folder name into version ('1.2.13' -> (1, 2, 13)).
    """
    try:
        return tuple(map(int, fname.split('.')))
    except ValueError:
        return (0,)