Add handling to encode subjectPrefix

If subjectPrefix contained special characters, it could cause an illegal URI to be embedded 
in the SoTD section.
This addresses issue #340.