Fix gems helper command to work with GNU sed

Repeating the `-E` flag fails with GNU `sed` (brings up the usage/help description). This fixes the `gems` helper command with GNU `sed` (Linux) without breaking BSD `sed` (OS X) compatibility. Supersedes #411.