Fix SideEffect() and BuildDir(). (Anthony Roach)