If you're careful, a straight edged razor from a utility knive works the best. It works best because you can straighten more than one pin at a time as well as ensure that all the pins line up in a straight row. I've had quite a bit of success with this method. It's a lot thinner than a nail file, although it will accomplish the same thing. Just have to be more careful. Sometimes when I receive them from online (OEM version -plastic case, label with processor's name , the processor and the sponge cover over the pins). They just sometimes get smashed.
BUT BEWARE! If you aren't careful, you can accidentally render the chip useless. It did happen once to me with an AMD X2 5200+ AM2. I could have kicked myself you know where. $159 down the drain. Worked out though since I replaced it with the 6000+ series. I'm happy.