Add lock mechanism to buildGettextFiles