package.py bug fixes

- fixes bug that puts inline scripts/stylesheets out of order with respect to non-inline ones

- proper escaping of query params in script src

- more forgiving of js filenames... they don't need to end with .js.
It's more likely that we'll reference non-standard js naming than css
naming. eg: https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false
is a js file