Make the path compatible with local mode.