It's not the first thing investors look at, but safety plays a role. Few accidents indicate an efficient railroad.