Fix semaphores create/opening (client.cpp should go first).