Preserve scheme when redirecting to blob \ cdn

So far all I've done is rebased on dev. I'm still going through and making sure I got the merge conflicts resolved.

Fixes bug #576