Correct generation of error messages in efg/nfg file format parser.

The function generating error messages on parse errors on efg/nfg files
was returning a pointer to a character buffer, which was not guaranteed
to continue to exist after the function returns.

This corrects this by returning instead a std::string object, which is
more proper.