Tests for PROFILE detection

Baby steps towards a tested install script, take 2:

This PR tests how the PROFILE is detected and simplifies conditions is the install function.
if you do `local NVM_PROFILE` on the line above it, then it won't leave behind an env var in most shells