Imported scripts from rbenv-installer.