The other answers have covered why you don't put the rocket motor at the top but not covered this point of the question.
Why do we not pump the exhaust gases up to the top of the rockets before expelling them?
If you're pumping the exhaust gasses to the top of the rocket, the thrust of your rocket is exactly the power of the pump, minus losses due to inefficiency. What's powering the pump? Wouldn't it be better to use that power source to drive the rocket directly, instead of using it to move around the waste products of some messy chemical reaction?
So lets assume you just mean diverting the exhaust from a burner at the bottom of the rocket to nozzles at the nose. The power of a rocket comes from carefully shaping the combustion chamber and exhaust nozzle. Only a part of the thrust comes from the pressure of the exhaust gasses causing them to squirt out of the combustion chamber. Most of the thrust comes from the shaping of the nozzle, which lowers the pressure of the exhaust gasses and accelerates them to very high speeds. Fitting a pipe from the bottom of the rocket to the top (which would have to contain at least one 180° turn) would completely ruin the geometry of the nozzle, almost certainly to the point of making it not work at all.
You'd also need to contain the extremely hot exhaust gasses, which would be trying very hard to melt your pipe, losing energy all the way.