Fixes #3517 : Now handle exception when the lock file is already taken.

http://www.rudder-project.org/redmine/issues/3517