Implemented correct (as far as I can tell) encoding of TDS paths