Handle ruby-build custom definition files gracefully.

ruby-build optionally accepts a path to a custom definition file in place of one of the built-in definition names. This patch fixes support for that use case by using the ruby name rather than the path when:
* Determining whether an install is needed.
* Setting global ruby versions.
* Setting file permissions.