WIP: Fix some stuff and compute the build dir.