prevent duplicates in SYS_PATH and fix tool executable lookup