Remove carriage return characters in version file

When created on Windows, .rbenv-version or .ruby-version files may have CR characters that will prevent rbenv from correctly parsing the Ruby version. Discard those characters when reading the file.
Add test for carriage return in ruby-version file
Simplify bash expression
Move carriage return test to version-file-read
Add \r to IFS instead of removing it manually
Merge pull request #567 from genezys/patch-1

Remove carriage return characters in version file

Fixes #566
Merge remote-tracking branch 'upstream/master'
Redo subtree, yet again
Squashed 'plugins/ruby-build/' content from commit d36e88c

git-subtree-dir: plugins/ruby-build
git-subtree-split: d36e88c59effbab9b35403f58d34fcb1e0e4f45b
Merge commit '10196ba68f9a6d0c41a6310c3cbd10b671596d8e' as 'plugins/ruby-build'