[thrift] fix directory prefixes, see #320