Fixes remaining IE 11 issues

This fixes:

- In IE 11, inline `<script type='text/python'>` tags would lose their new lines, resulting in syntax errors. Switching from `inlineText` to `inlineHTML` seems to have fixed this.
- In IE 11, attempting to use `location.replace` would result in a javascript error

Note that I am not happy with how I fixed `location.replace` but I've struggled to find a more elegant solution that actually worked. It seems that `location.replace` is a special snowflake that has to be treated differently.

I also noticed that make_dist.py was generating files with `\r\n` endlines because it was opening as 'w' instead of 'wb'. I went ahead and changed this.