testwheel.py: Fix up the error handling
When no PySide was present, the too would error out:
testwheel.py", line 520, in <module>
VERSION[0] = path_version
TypeError: 'tuple' object does not support item assignment
This apparently resulted from some old code trying to determine
the version from the path.
Split out the code trying to find the root into a helper
function and reorder the code for clarity. Print out errors
to stderr.
Change-Id: I3f4e878cf3e3d09466180c65e92da98946ee6826
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>