Reading tmpDir correctly