Changed mkdtemp to use specified /tmp root for temp dir to not exceed length limit