fix to issue of multiple flume processes running

now writes to pid file and checks that pid file when attempting to start a new process