improve `versions` tests by cd'ing into a clean slate
restore original IFS for hooks
test that IFS in hooks is correct

closes #379