replace the shell script with a python method

This pull request makes qpdfx a bit more easy to install, because the whole project is just one file.