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.

Ref: GH#148