Ensure that filenames are unique

I found this feature request, please upvote it.