When deleting a directory recursively on *nix, cheat and use rm -rf first, and if that fails, then fall back to the Java API to try and delete recursively.