fixes #5320; checks if dir is writable
fixes #5320; checks if dir is writable

centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon