HDFS-5224: work in progress refactoring to use Path