added cwd member to thread struct and set it when creating a thread