BUG: Change working dir when building extension.

Current working directory should be changed (to trusted one) when building
an extension so compiler accidentally won't pick up anything from (untrusted)
current directory.
Merge pull request #2660 from TomasTomecek/weave-build-cwd

BUG: Change working dir when building extension.