Fixes #551 - remove gsub in requirejs tag

- Fixes #551 - removes gsub in requires tag.
- Also, moves requirejs tag outside of footer element.