Change method for deleting directories.

Should hopefully stop the intermittant error of it emptying directories and then failing to delete them.