Unify parsing of text strings into Rational numbers #93 

I have reused lexical_cast() so that the same function is used for both file and string.