Make px_mkfw.py and px_upload.py compatible with both python 2.7 and 3.3

This has been tested on Ubuntu using Python 2.7.4 and Python 3.3.1 and QUpgrade.

Please cross-test on Windows and Mac.