MODULES-467 Function file_join for smart path joining