def get_dataset_filename( name, ext ):
    """
    Builds a filename for a dataset using its name an extension.
    """
    valid_chars = '.,^_-()[]0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
    base = ''.join( c in valid_chars and c or '_' for c in name )
    return base + ".%s" % ext