Fix for stale PIDs not being cleared properly

If you have a stale PID in the file that is longer than the new PID the
tail of the old PID will be left in the PID file.

eg - old PID is NNNN, new pid is PPP.  Final PID in file is PPPN.