Also I think you should use our API to get the temporary directory instead. See Environment.