Have you tried storing it with .g extension instead. Since it looks like Marlin does not use the filename we send it is no wonder it does not find it. Question is why that happens. Does it always remove last char or is this a special case they do wrong. I'm no Marlin expert to say what goes exactly wrong here, just know there are many marlin versions and releases, so one running version does not mean others work the same.
I think this is a pure software problem and from the current data I assume it's the firmware side doing it wrong. You could test with pronterface as counter test if host does not do what it says. If pronterface also fails on same filename it is a firmware issue.