[build system] honor TMPDIR environment variable
closes #229