To cut down on problems with certain characters creating issues, all file names are just set to the actual file id. This makes it so the file upload will work on any system no matter the character set being used.

As for your old attachments. That I'm not too sure on, it sounds like possibly an upgrade issue where the actual file attachments aren't attached to a post. If you're familiar with mysql, you can take a look in the FILES table and look to see if all of the fields are populated on some of the old imported POST_IDs.