Framework loaded, Media manager

* Added check to ensure framework is not tried to be loaded 2x
* Media manager now outputs correct URL in the URL button for types !=
image of pdf.