Update index.js

Fixing issue with maxFilesSize not being enforced properly.

Moved the progress check to not modify self.totalFileSize, but just compare against self.totalFileSize + counter.bytes.