Use temp CWD instead of chdir. Avoids LexoticException.
Merge pull request #56 from donaldh/indir-temp-cwd

Use temp CWD instead of chdir. Avoids LexoticException.