Returns the toolchain module name based on the path.
The behavior is as follows:
- For given path, if a toolchain config exists return the first registered toolchain.
- If no config exists for current path, walk the directories upwards looking for default.