Fix determination of ROOT_DIR -- ternary operator only works for arithmetic expressions in bash.