Updated plugin to rely on PID files

This is especially useful if you run uwsgi in emperor mode which was not covered in the original implementation.