Forbid MOD file names that are too long.

And rename filenames in the testsuite that are too long.

Closes #626