Move carriage return test to version-file-read
Add \r to IFS instead of removing it manually