According to the Regional Federal Railroad Administration, placing a penny or anything else on a railroad track is considered vandalism, a simple misdemeanor in most of the 50 states. Not 5 or 10 years in jail, not a felony. Of course if you remove the penny or file, it is no longer vandalism.
Now, removing a spike to make a knife out of, that IS a felony, both theft and vandalism, and destruction of property. A removed spike is much more likely to cause a train to derail than about anything you can place on the track.
Yes, I saw the Wisconsin case of a brick derailing a train, and am dubious of it's authenticity or feasibility since I've known train drivers to place chips of flint on the tracks to give a light show at scenic train depot.
Good to know about annealing in a bonfire. I wasn't sure that would do it, but I will try that next month (as soon as the snow melts, hopefully). What is so special about the "Black Diamond" files. I've seen them mentioned in a few threads now.