Improved detection of erlang install directory