Replaced a call to rindex() with strrchr(). The two should be equivalent but rindex is not available on MinGW, strrchr should be available on all platforms.