Moving build_dir setting to end.