Remove trailing slashes from RUBIES

I use `zsh` and my `$RUBIES` looks like:

    /Users/austin/.rubies/ruby-1.9.3-p448/

It has to do with some `zsh` option that I have set, but I don't recall which offhand. This change includes two fixes for this and a minor change elsewhere:

- Make `$dir` local when setting `$RUBIES` in the first place. Prevents it from leaking outside of where it's needed.
- The trailing slash prevents Ruby versions from being printed in the `"")` case; remove it on processing.
- The trailing slash prevents a Ruby version from being matched in the `*)` case; remove it on processing.
Merge pull request #195 from halostatue/broken_rubies_matching

Remove trailing slashes from RUBIES