Anki does it sort of like this. It's just a zip file but instead of a txt file, it stores cards in a Sqlite database. All the resources are in the same folder. Unfortunately, the data schema is not great (in my opinion) and so it has some limitations on how it can be extended.
I'm working on my own flash cards app (see my other comment) and decided to do something similar. I actually want people to create tools to create new decks. I think the ideal is something like what Anki has in Ankiweb, a place to share decks with others.