HPCC-10359 Embedded R fails if there are ^M characters in the source

Minor changes following code review

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>