I think, we should change the signature of this method. I'd like to replace `$jsSafe` with `$type` which is simply `css` or `js`. Then you don't need all that `pathinfo()` calls in here. And i think, it's safe to silently insert a `;` after all js files.