Fix python version detection in proxy.sh

Review 732 by @tryneus
Closes #1165