unittests and a few fixes for _bwa.py for the bwa wrapper