make toolchain.py unit tests robust against sessions with loaded modules
make sure temporary files can be created/used
clean up after tmp file/dir write tests
Merge pull request #752 from boegel/more_robust_unit_tests

make unit tests more robust