Derp.  Spent way too much time reading the rest of that code and ignored the "dirname" part.

In that case, yeah, assuming hadoop does actually create the needed temp directories (which I seem to recall as well that it does, although I may need to double-check that on CDH), then this should work.  Thanks for working on this, it's a big help.