Added pyretic_switch.py to fix bug

Added a new file to replace the old pyretic_switch.py code which
was broken