Stop chdir into test for feature tests.

Fixes #1317