### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Currently the VTL template for `request_templates` is not processed properly:

```
#set( $body = $input.json("$") )

#macro( loop $map )
{
    #foreach($key in $map.keySet())
        #set( $k = $util.escapeJavaScript($key) )
        #set( $v = $util.escapeJavaScript($map.get($key)).replaceAll("\\'", "'") )
        "$k": "$v"
        #if( $foreach.hasNext ) , #end
    #end
}
#end

{
    "enhancedAuthContext": #loop($context.authorizer),

    "headers": #loop($input.params().header),

    "query": #loop($input.params().querystring),

    "path": #loop($input.params().path),

    "identity": #loop($context.identity),

    "stageVariables": #loop($stageVariables),
}
EOF
}
```

results in,

```
'

{
    "enhancedAuthContext": {
    }
,

    "headers": {
    }
,

    "query": {
    }
,

    "path": {
    }
,

    "identity": {
    }
,

    "stageVariables": {
    }
,
}
'
```

### Expected Behavior

The template should be rendered and have the JSON properties.

### How are you starting LocalStack?

Custom (please describe below)

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

    docker run localstack/localstack

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

    awslocal s3 mb s3://mybucket


### Environment

```markdown
- OS: MacOS
- LocalStack: 0.14
```


### Anything else?

This example can be used to validate.
https://github.com/localstack/localstack-terraform-samples/tree/master/apigateway-lambda-velocity
return re.match(PATH_REGEX_PATH_MAPPINGS, path).group(2)
def get_base_path_mapping(path):
    region_details = APIGatewayRegion.get()
    
    domain_name = get_domain_from_path(path)
    base_path = get_base_path_from_path(path)
    mappings_list = region_details.base_path_mappings.get(domain_name) or []
    if base_path:
        mapping = ([m for m in mappings_list if m["basePath"] == base_path] or [None])[0]
        if mapping is None:
            return make_error_response(
                "Base path mapping not found: %s" % base_path,
                code=404,
                error_type="NotFoundException",
            )
        return to_base_mapping_response_json(domain_name, base_path, mapping)
    result = [to_base_mapping_response_json(domain_name, m["basePath"], m) for m in mappings_list]
    result = {"item": result}
    return result
def add_base_path_mapping(path, data):
    region_details = APIGatewayRegion.get()
    domain_name = get_domain_from_path(path)
    
    
    base_path = data["basePath"] = data.get("basePath") or "(none)"
    result = common.clone(data)
    region_details.base_path_mappings.setdefault(domain_name, []).append(result)
    return make_json_response(to_base_mapping_response_json(domain_name, base_path, result))
def update_base_path_mapping(path, data):