-rwx--x--x 1 0 0 4125 Jul 2 08:09 menusort

This doesn't look right - menusort should be 4104 bytes long, not 4125. Maybe it got corrupted somewhere on the way to the empeg? The bash error message still doesn't make sense, but I'd try correcting this first.

Borislav