fixed nvm_version result when multiple versions match the given pattern
added test for using the latest of two versions