Fixed issue #6 Incorrect handling of incorrect file permissions
Added checking of permissions
Added removing socket at worker exit