'Fixed' a bug that caused a std::bad_alloc error when sorting large files

Bug fix that caused the program to abort on some large sorts.