Thousand frames

The selection of frame numbers based on file names has been using the wrong part of the file name.  This only causes problems when there are more than 999 frames.  This pull request fixes the issue so that frames numbered 1000 and higher are correctly detected.