1. Implemented locking for scripts so only one instance is running
simultaneously. This will also remove stale lock file if found.
2. Use LDAP contextCSN value to determine if we need to run script
at all. Previous contextCSN is stored in state file which will
be cleaned during reboots. If state file is not found direcotries
are scanned in normal way.