VariableSpec: implement percent encoding correctly

Thanks Guava for UnsignedBytes!