Pipe ending machine