Added support for replacement of standalone instances of \r based on jkshapiro's recommendation. I've never encountered an issue with this, but it might be wise to account for it.