Fix hyphenated ID decoding

This pull request adds tests for `DecodeString()` and fixes hyphenated ID decoding to avoid an index out-of-bounds panic.

@jrconlin r?
Nice catch! Since `GenerateBytes()` returns a valid ID, `id.Encode()` will never return an error.