Fix Python2 support in pidlockfile PID file creation.