Add error checking to nvm_tree_contains_path
Adding unit tests for nvm_ls_current. Relates to #487.
Fixes #487.