net/ipscan: rewrite a big part of the code

* Use '/usr/bin/env' bash as interpreter
* Change all $() variables to ``-style
* Use python3's ipaddresses module to generate list of IPs
* Use printf instead of echo
net/ipscan: unset PYTHONPATH temporarily

Prevents error when user has a 2.x PYTHONPATH