detect if the tmp directory exists in a 1.8.7 compatible way