Add API + tests for Swarm

can you modify the code so the output file is actually the one that you're passing using the `'-o'` parameter? The problem right now is that the user won't be able to specify the output file. Also, the direct user of the `Swarm` class will need to take into account that this file is temporal and should remove it, which is not elegant.