Move a bunch of codes in bin/percol to percol/cli.py (refs #8)

This change makes percol easier to be used as a python module