remove useless call to strdup() in get_temp_dir()

Since env variables and "/tmp" (literal string) are present for the
execution of the program, there's no need to call strdup().

Also constify the tmp variable.

Closes #182

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>