fix builddir expansion issues