LPS-45766 fixed merge() usage and added missing period char on non-empty paths