Add API + tests for Swarm

`isdir` and `join` are imported but unused