For future reference, you should add this as a reply to my answer, not add this as another answer.
The script processes the sequences as is and performs no filtering; the other tools may give different results depending on whether they pre-filter or not. TBH I'm not sure.
EDIT: Also, make sure the N50 you're comparing is contig or scaffold-based (and whether there are any minimal N counts needed to split scaffolds into contigs).