Adds HDFS method to create a tmp dir.

Using a const function above to assign `tmpPath` to `path` and than returning `path` seems to obfuscate the control flow a bit. Why not just return `tmpPath` here?