move/delete directories (Fixes #234)

Pulled out calls to the mongo driver into a MongoWrapper trait which
puts everything into Task.

Additional tests.