[scripts] [common] whereis always returns 0; so let's use which instead