improved semaphore lock to handle concurrent access of p4d and command line tool