fix check to see whether build dir was located