def join_filename(basename, extension):
    """
    Create a filename joining the file basename and the extension.
    """
    basename = basename.rstrip('.').strip()
    extension = extension.replace('.', '').strip()
    filename = '{}.{}'.format(basename, extension)
    return filename