Extension detection improved

Previously it cannot get extension from filenames like *bootstrap.min.css* or *jquery.min.js*