two bug fixes

Testing out CamanJS's feasibility for a project and I came across two bugs.

1. IO::remoteCheck had been removed, but it was still being used in Renderer::loadOverlay. I added it back in, refactoring a bit in the process.

2. improper reference to the renderer in Layer::overlayImage.