Improved zipFolder() for cross-platform support