[ -d "/path/cartella" ] || mkdir /path/cartella

mi pare sia -d, in ogni caso "man test" è tuo amico