Use Dir#mktmpdir for testing in a temp dir