def append_default_extension(filename, default_extension='.png'):
    """If a filename has no extension yet, add the default extension to it"""
    if '.' in filename:
        return filename
    else:
        return filename + default_extension