Oh, and one more bit of analysis: if you average 10 points of damage per hit or less, the +2 rapier is clearly better than the keen one. An additional +1 enhancement (from +1 to +2) increases your damage output by 5% (from the additional accuracy) and also by +1. Keen weapons, again just increase your damage output by 15% (again, in the best case).
So a keen weapon increases your damage output by 10% more than the extra +1, but the extra +1 yields another flat +1 point of damage. This means that if you average 10 points of damage, they provide equal benefit. Keen is worse for lower average damages; for higher average damages, the extra benefit from keen accrues pretty slowly (if you average 20 points of damage, keen is worth +3 points of damage, while the extra +1 is worth (counting the improved accuracy) +2.)
This says nothing about the added benefits of the higher enhancement that have already been mentioned here: better ability to bypass DR, and benefit of being useful against almost any opponent.
So I'd definetly recommend against keen. Go for either +2 or +1 and an energy ability - which one depends one depends on how many creatures with energy resistance or DR you expect to meet, and how easily friendly sorcerers can give you a GMW.