Use file~timestamp.ext for version (fixes #1010)

@AudriusButkevicius Stare at this one please? Tested manually, seems to work, but versioning has been screwed up before. :)