correctly generate .onion addresses. closes #6559