Move dist-jar-complete target to dist.xml
Use sticky bit logic for finding appropriate tmpdir.

The logic added here includes an additional check for sticky bit
which would make world writable dirs ok to use for tmp location.
The sticky bit will default to false on JRuby when native support
is not available, but world_writable also returns false (nil) at
the moment. This means on non-native JRuby the normal given temp
dir will be use if it's a dir and writable, but this is not a
change from before this commit. On native JRuby, a world writable
dir is acceptable if sticky bit is set, which fixes #405.