CDAP-1024 copied HashCodes toString method into our utility

class to make sure the directory path is valid.