Ok, I think I have a working patch for this issue. I patched ido-file-internal, ido-read-file-name, and ido-read-directory-name, and I think that's all the code paths that need to be fixed. Now the test case described in the original report produces the correct result for me: writing to /tmp/mumble.frotz. However, I should note that this is still relatively untested. I will test it out and try to make sure it doesn't cause any unexpected issues before I recommend merging it.