Moved directories equality checks to another method and moved unit test to the core/domain package
Returned dataDirectoriesChanged parameter from server to the agent