Addresses #104, Shorten long filenames on import

This fixes the problem for attached files. I assume this is still a
problem for importSnapshotFromFile(), which uses copyTo() on a
directory. For that we'd need a copyDirectoryToUnique() function that
shortened the names of all files in the directory.