Actually, the input file can be an exception to this rule. An input filename can be "long" (12345678901234.TGA) but if it is, then a "short" output base name must be supplied. However, please bear in mind that when dealing with temporary files, short names are usually preferable anyway.
There is no exception for the output file. It must be five characters maximum.