Simplify list comprehension and get values, not keys

I must have been asleep.
Merge pull request #6189 from basepi/tmpfiles

Simplify list comprehension and get values, not keys