The other point that I did not make is, we already have electrified railroads and have had since the Diesel Electric locomotive was invented. These engines are powered by electric motors and they do it without wires and all the other paraphenalia that straight electrics require and they have the flexibility to go anywhere, not just where the wires are. They just carry their electricity power plant on board with them and only generate their electricity as needed. Basically, at this point, the only advantage to straight electric power is it can be generated by using fuels other than diesel fuel, such as coal or nuclear. The economics then for converting would only come into play when the costs of liquid fuels reaches the breaking point, and I don't see that happening for many years.
There are significantly greater levels of acceleration possible with electric trains compared to diesel, especially at high speed, and electric trains use about 1/3rd the energy of diesel trains, which can be a significant source of savings (mainly for passengers and high speed freight). As well, you can save a significant amount of money by using fewer locomotives (there are 13,000hp electric locomotives in common revenue service, diesel maxes out at 6,300hp so far), both in terms of initial capital outlay and in terms of locomotive maintenance costs (~100-200K per year). That's over and above the reduced maintenance costs and higher reliability of an electric locomotive in the first place.
That said, I do not think that freight will electrify, though I think it increasingly likely on the part of commuter and high frequency intercity passenger lines.