tor-netdoc: fix panic with non-ascii in port policy
Found via fuzzing. The non-ascii-policy was copied from bogus-policy and tweaked (the fuzzer came up with a shorter reproduction, but i figured probably should stick to the similar format of the others)
I'm not sure if InvalidPort is the correct error here, but it's the only one that function throws, so probably?
I ran the fuzzer for a bit more after fixing this and it didn't find any other issues quickly, but string indexing from untrusted sources is likely a source of crashes elsewhere.