Python 3 compatibility for nasapower.py

I fixed a minor issue with nasapower.py to make it compatible with Python 3. I tested it with Python 2.7.8 and Python 3.4.1. The syntax should be compatible with Python 2.6 too.