Add ability to specify location of pid file

For convenience, we like to store PIDs of all relevant processes in one location on production servers.

Also included: bugfix. Versions of python 2.6 or earlier require indices to be specified with format