Unfortunately there's no perfect way to do this, but I'm going to add some calls to File.deleteOnExit() on the temporary directories. The problem with deleteOnExit is that it only works when the JVM exits normally, not if gets killed from outside.
Maybe the best way to solve this would be to let Mesos manage the temp directories, because the mesos-slave is a long-lived process that knows for sure when our JVM crashes. We've discussed adding support for that in Mesos but it's not there yet.
Matei