Semaphore implementation for files, orm and sysv.
Few fixes around.