Test for success of librarian before writing semaphore. Resolves #33.