Use dub to build redo and fix directory bugs.

I'm now following dub's directory structure conventions, and solved
nested directory bugs with duplicate redo databases being created, as
well as the directory tree not being properly traversed.