Replace trivial regexp with string or index, twice as fast

There are a few places where there are boolean conditionals using a regexp for a single character when a string or index would suffice. Using index(',') instead of =~ /,/ is about twice as fast, and the split usage is about 25% faster.