pmlogger_check fix small timing window / race condition
pmlogger_check fix small timing window / race condition

There was a race condition that was sometimes exposed by QA test 119
where the attempt to create the lock file would fail because the lock
file already existed, but by the time the status of the lock file was
checked the lock file had been removed.  Some convoluted logic
translated this into the confusing messages
    Warning: removing lock file older than 30 minutes
    ls: cannot access <path>/lock: No such file or directory

Fixed by a guard to test the existence of the lock file after the
pmlock fails.

All of this is safe because it is within a loop that keeps trying to
acquire the lock, and the race condition is most unlikely to be
persistent.

wuliming/pcp,mbaldessari/pcp,prasincs/pcp,ryandoyle/pcp_original,ryandoyle/pcp_original,prasincs/pcp,mbaldessari/pcp,aeg-aeg/pcpfans,tjanez/pcp,ryandoyle/pcp_original,mbaldessari/pcp,aeg-aeg/pcpfans,aeg-aeg/pcpfans,wuliming/pcp,wuliming/pcp,ryandoyle/pcp_original,prasincs/pcp,tjanez/pcp,prasincs/pcp,adfernandes/pcp,andyvand/cygpcpfans,wuliming/pcp,tjanez/pcp,aeg-aeg/pcpfans,mbaldessari/pcp,ryandoyle/pcp_original,adfernandes/pcp,prasincs/pcp,tjanez/pcp,tjanez/pcp,prasincs/pcp,wuliming/pcp,adfernandes/pcp,adfernandes/pcp,edwardt/pcp,prasincs/pcp,wuliming/pcp,ryandoyle/pcp_original,tjanez/pcp,andyvand/cygpcpfans,aeg-aeg/pcpfans,edwardt/pcp,edwardt/pcp,ryandoyle/pcp_original,andyvand/cygpcpfans,aeg-aeg/pcpfans,mbaldessari/pcp,adfernandes/pcp,edwardt/pcp,wuliming/pcp,ryandoyle/pcp_original,edwardt/pcp,tjanez/pcp,andyvand/cygpcpfans,adfernandes/pcp,edwardt/pcp,mbaldessari/pcp,edwardt/pcp,prasincs/pcp,aeg-aeg/pcpfans,edwardt/pcp,andyvand/cygpcpfans,andyvand/cygpcpfans,adfernandes/pcp,adfernandes/pcp,andyvand/cygpcpfans,aeg-aeg/pcpfans,tjanez/pcp,wuliming/pcp,andyvand/cygpcpfans