Fix mkdir failing to create folder structure

I stumbled over the problem that no backup folder was created if it didn't exist...replaced mkdir() with the more robust and native method writeTree() of the modx cacheManager.