Add permtools.py and avclasswithbasis.py