Anyone know this story?

I remember this old episode of The Jim Henson Show with the storyteller, where he told this really great story, and I was just wondering if anyone knew whether it was an actual story, or just something made up for the show. I seem to recall hearing it before, but I’m not all too sure.
It’s about a man who, while traveling along to no where in particular, meets two/three old beggars, shares what little food he has, and receives some magical gifts, including a deck of playing cards that will never allow the owner to lose whatever he plays, and a sack that upon saying “[Item] get in my sack,” that item mystically flies into the sack (he first uses it to catch chickens).
At some point, he takes shelter during a storm in this building where he’s approached by deamons, but convinces them to play poker with him and not kill him as long as he keeps winning. Eventually, the sun comes up, and he manages to steal the leg of the main demon and use it as a little bargaining tool for later on.
Later in life, he gets married and starts a family, and becomes rather famous for being a healer or something, and is called upon to help the king who’s become deathly ill. He summons up the demon and receives a special glass goblet that, when you look through it, allows one to see Death. If Death is at the foot of a sick person’s bed, he can sprinkle water on him, and Death will go away. If Death is at the person’s head, then there’s nothing one can do. He manages to heal the king, but one day, his son falls ill, and he sees Death at his head. So, he traps Death in his sack, but soon realizes what a horrible thing he’s done, because now there are all these fatally ill and wounded people walking around who can’t die. He finally decides to release Death, and Death refuses to ever take him. He tries to get into Heaven and Hell, but both places reject him because he’s not dead, and eventually, he becomes a sort of spiritual guide, leading the dead to whichever destination they deserve.
So, there’s the whole story. The show really stuck with me as a child, and I’d love to be able to find a copy of it somewhere, but for now, I’m more kinda interested in whether or not a written version of this story exists, and if so, who wrote it. Thanks.

Sounds like an updated and Americanized version of Seumas MacManus’ Irish story “The Tinker of Tamlacht,” which includes the magic bottle that will cure nearly any illness.

Versions in folktale form include “Wicked John and the Devil” from AMERICAN FOLKTALES AND SONGS (Dover, 1951), in which the protagonist receives his magical gifts from Saint Peter, is refused at both heaven and hell and ends up as the original Will o’the Wisp; and one in Zora Neale Hurston’s MULES AND MEN (Lippincott, 1935).

Wasn’t it The Storyteller (with John Hurt) rather than The Jim Henson Show? (Or is that what you mean? It was The Storyteller in the UK.) If so, it’s available here.

This site says that Arthur Rackham and Anthony Minghella both wrote a version, and it was originally a Russian folk tale.

Thanks guys!