Make chem-balance work with python3

Reformat code
Fix chem passing argument to chem-balance