nvm_format_version: add unit tests.
Create nvm_ensure_version_prefix, and make nvm_format_version actually format the version.