Fix zip file prefix search logic

Previous implementation was actually buggy compared to how the zip files were unpacked in non-Mac systems.