Testing if filenames for aggregation *end with* .ext

During aggregation, original code picks up all file names that contain '.'+ext. During development, directories may contain backup files, .swp files etc. These files will make into aggregated code. During development, if you use vim as an editor, aggregated code will pick up .swp files as well (.filename.js.swp) which leads to erroneous aggregated code.
Proposed change leads to aggregation picking up only file names that *end* with '.'+ext. Problem resolved.