Use system globals instead of hard-coded /tmp path.