Fix batch processing for a mix of css and js files.  When batch processin

Fix batch processing for a mix of css and js files.  When batch processing it gets the type from the first file and uses this for all files.  This patch fixes it so it loads the type for each file.