For future reference, you might want to look into 3ds Lazy. it's more or less a frontend for all the tools and scripts you need to run against a rom to generate a working .cia. It's not perfect (for example, it doesn't deal with card2 games correctly last I checked) but it's significantly easier than dealing with a heap of different scripts to get a working output.