ctp.py: added warnings and made parse_line func

The script can now warn the user in case s/he attemts to manipulate
pins without specifying a ground and/or vin.

Also made a parse_line function to make the parse_code function less
complex