Update index.js

keep makeTmpDir method signature stable, always a string for the first arg etc.