install.sh: use a more generic SOURCE_STR

SOURCE_STR currently includes the value of $HOME (at install time).
Change SOURCE_STR to include a literal "$HOME" (to be expanded at
profile runtime) so that sourcing nvm will work if the user changes
their username, shares their profile, et cetera.

Also use the more portable single-square-bracket test.
Merge pull request #296 from frasertweedale/fix/generic-source

install.sh: use a more generic SOURCE_STR
For zsh users

i use zsh and i did this update in install.sh local, is good for you too :)
Properly remove the tar file.
Fixed bash error caused by lack of double quotes
Add -f
Merge pull request #311 from loganfsmyth/remove-tar

Properly remove the tar file.
Merge pull request #312 from quiqueg/master

Fixed bash error caused by lack of double quotes
Merge pull request #305 from marioidival/patch-1

For zsh users
Addressing comments raised in #171
fix MANPATH generation on FreeBSD

On FreeBSD, if MANPATH is set it is used verbatim; configuration
files are completely ignored.  Therefore, setting MANPATH to (only)
the nvm man dir makes system man pages unreachable.

To get around this, before doing anything else to MANPATH, if it is
empty set it to the output of manpath(1).

One further complication: FreeBSD automatically adds a path to the
man pages path for each path in PATH that ends in "/bin", which
causes "~/.nvm/$VERSION/man" to be added.  This interferes with the
subsequent substitution so strip this from MANPATH before the
substitution.