I seem to remember, a little while ago, reading about software that removes, or at least minimises, lens distortion. The particular application I recall had plugins for a wide variety of specific lenses, and ran on Macs and PCs.
I didn't buy it then, and now I can't find it again!
Are you refering to [a href=\"http://www.dxo.com/]DxO Optics[/url]? You'll find reviews on this site here
Other alternatives are (among others) PTlens
which is free for PCs and LensFix
for Macs ($39). Both (PTLens & LensFix) come out from the same source code tree.