Make all console.log calls conditional on debug flag

These can cause errors in older versions of IE.
Remove trailing slashes after last object property

These can break pages on older versions of IE.
Don't append script elements then execute them

Rather than appending new content then executing the content
of its <script> elements (which could potentially cause problems),
strip the <script> elements out of the content first, append
the content, then execute the scripts.
Merge pull request #58 from townxelliot/ie-fixes

Fixes for Internet Explorer 9