test-lib: use subshell instead of cd $new && .. && cd $old