fix fetching the repoindex file

Tempdir went out of scope and was removed before index could be parsed.
check for beeing root