remove uses of tmpnam
add <cuda>/lib64 only if exists to suppress linker warnings
Merge pull request #1044 from jeffdonahue/no-tmpnam

change uses of tmpnam to mkstemp/mkdtemp