Implement per-thread current directory
map chdir paths
helper function should be static
Merge pull request #394 from KentuckyCompass/threaded_cwd

Threaded cwd