HDFS-5642: replace rindex with strrchr.