Update apt.py to escape dpkg-query output string correctly