configure pytest and coverage.
configure travis-ci.
add badge icons.
improve the py3k compatibility of external scripts.
Merge branch 'configure-ci'