fixed executable path retrieval on OSX