don't create empty versions

Don't create empty versions. For example this happens frequently if you create a new text file in the web interface and than edit the file. After save, the first version (which was the empty file) gets versioned. This pull request prevent it.