Extract and install plugin from file-like object (e.g., opened file,
    ``StringIO``).

    Parameters
    ----------
    fileobj : file-like
        MicroDrop plugin file object to extract and install.
    plugin_path : path
        Target plugin install directory path.

    Returns
    -------
    (path, dict)
        Directory of installed plugin and metadata dictionary for plugin.

def install_fileobj(fileobj, plugin_path):
    '''
    Extract and install plugin from file-like object (e.g., opened file,
    ``StringIO``).

    Parameters
    ----------
    fileobj : file-like
        MicroDrop plugin file object to extract and install.
    plugin_path : path
        Target plugin install directory path.

    Returns
    -------
    (path, dict)
        Directory of installed plugin and metadata dictionary for plugin.
    '''
    plugin_path = path(plugin_path)
    tar = tarfile.open(mode="r:gz", fileobj=fileobj)

    try:
        tar.extractall(plugin_path)

        plugin_metadata = yaml.load(plugin_path.joinpath('properties.yml').bytes())
        fileobj.seek(0)
    except:
        # Error occured, so delete extracted plugin.
        plugin_path.rmtree()
        raise

    # TODO Handle `requirements.txt`.
    return plugin_path, plugin_metadata