Building a correct segment path for HDFS