perforator.py: better cmd parsing