Building a structure is a also a good way to avoid the swarm, BUT it must be big enough so that they can't attack your body if it messes through. A two by two hut will work, but it must be 2 walls high.
Hopefully Wild Card will greatly reduce the number of swarms in the game. I don't have a problem with the swarm being a pest once an hour, but every few minutes is way too much. Good luck survivors.