Stop chdir into test for feature tests.

Fixes #1317
Remove require() calls in Loader test.
Fixes #1546