Make cardinfo Python 3 compatible, don't execute through shebang

Zipping won't allow the file to be executable, so that would cause
problems anyway. The script can now be run through Python 2.6+ and
Python 3+ which should work on most platforms.
Make JSON parsing more error proof, log errors