Adding script data to mini script file

The existing code will sometimes add data to the beginning of a mini script file, but if the script file has an external dependency (such as jQuery), the script data will sometimes load before jQuery has been included, resulting in a console error.

This update adds script data directly to the file in order for everything to be enqueued correctly with the right dependencies.

Signed-off-by: Ronald Huereca <ronalfy@gmail.com>