Clean ups.

Use gnu + BSD friendly -E to turn on extended regexps and simplify shard
spec validity checks.  Also use more descriptive shard spec component
names.