Handles zip and wsjar protocols properly (fixes #808)