It fails to do that because it's actually not a trivial thing to do at all when you're not familiar with the field: it is very difficult for a non-IT professional to take a look at Kruskal's pseudocode ( http://en.wikipedia.org/wiki/Kruskal%27s_algorithm#Descripti... ) and to state if it solves an existing pain or it's just describing trivial and intuitive, common-knowledge steps.
A solution would be to have patent reviewers splited in categories based on their professional accreditation and limit their ability to accept or deny patents to their field of expertise.
It's the same principle as PG mentioned in his essay that first rate technical people do not hire themselves out to do due diligence work for VC's, and as a result the "experts" VC's do send over are generally a joke. What's to prevent the same from happening in the patent review office?
I doubt this will raise final consumer prices since for new inventions the price is more often than not what the market tolerates - I think companies will be forced to drop trivial applications as a response to the fee increase.
The other change I would make would be to limit the patent validity to 10 - 15 years max, so after the rich people pay for the research, the invention becomes available to the masses close to the actual production cost.
As for limiting the patent validity period, the current 20 years that most nations follow is not all that long depending on the circumstance. A better method (if it's even regulatable) is X years of protection OR until you recoup your original investment + X % of return (whichever occurs first). The problem is to then police the claims of cost to invent the patent, which is a whole can of worms on its own.