Return a ScriptDeployment from script with possible template
    substitutions.

def script_deployment(path, script, submap=None):

    """Return a ScriptDeployment from script with possible template
    substitutions."""

    if submap is None:
        submap = {}
    script = substitute(script, submap)
    return libcloud.compute.deployment.ScriptDeployment(script, path)