That should work I think, you can also try putting your scripts in the ACP at /admin/appearance/customise#custom-js