Fix gems helper command to work with GNU sed

Repeating the -E flag fails with GNU sed (brings up
the usage/help description). This fix works with GNU
sed without breaking compatibility with BSD sed.