Well! Isn't that interesting! I was just about
to post that I thought that line came from
Blazing Saddles, but I thought I'd better check first. Turns out it originated in a 1927 novel
Treasure of the Sierre Madre, made into a movie in 1948. It did appear in
Blazing Saddles, but that is not where it originated.
Wikipedia entry - I'll try to post it as a link but my links never work for some reason:
http://en.wikipedia.org/wiki/Stinking_badges