extract deleteDirectory to method, so we can switch to other implementation if we want, like for JGit. Still doesn't solve Windows issue right now, though.