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 'sstephenson/master'

* sstephenson/master:
  Add \r to IFS instead of removing it manually
  Move carriage return test to version-file-read
  Simplify bash expression
  Add test for carriage return in ruby-version file
  Remove carriage return characters in version file
Updated reference to ruby-build.