make sure build directory is always set before proceding.