PID fixes to stop race condition when stopping and starting Flapjack

 - Make the pidfile a class variable, so it exists for all functions
   that try to reference it.
 - Get the pid before issuing the kill, so the pid isn't always nil