For that recipe I recommend you simmer the butter in water with the “herbs”. Allow it to cool and skim the resolidified butter off the water. The flavor compounds end up in the water, the “essential oils” go to the butter. Your cookies (or brownies) will be far more palatable.