added getTtyPath() API.