Take a stab at loading reader.html, readium-shared-js, etc. using NSURLProtocol, and loading EPUB content using 127.0.0.1 in order to separate the contexts for improved security.
Load reader.html and related resources directly from the bundle using a file URL rather than NSURLProtocol.
When initializing a new EPubViewController, clear the package rootURL since its port may have changed.
added missing Rangy JS scripts to reader.html (for Media Overlays CFI character ranges)