Cleaning up PATH mess

Now the PATH variable will be constructed from an array of dir entries.
These entries are themselve checked whether they exists on the system
and if yes, added to PATH