Fix "spawn" reference and add a "pipe" method to the resulting promise.