support for different 'os' versions

So basically tmpdir was renamed into tmpDir. So we should use whichever version is available.