Adding check around unsanitized prefix

@charleso @markhibberd 
At some point I suspect Mark and I are going to draw a line in the sand about doing property-based tests. It's something we should be doing by default unless there's a compelling reason not too.

Let today be the first day of your property testing life. :)