Make 'Running "nvm deactivate" should unset the nvm environment variables.' work again

/bin/sh doesn't like `while [[ ... ]]`. It much rather prefers `while [ .. ]`

Also minor spacing changes
 Make test 'Running "nvm use foo" where "foo" is circular aborts' work again

Slight problem with the output. The test expected an alias to be returned, but an empty string was returned.