Fixed unit tests and refactored DeleteDirectory method