staggered versioner: count directories as files (fixes #607)

directories are counted as files which should fix that directories that only contain directories get deleted, also moved the check if we want to delete the versions directory down so that the debug line "versions dir is empty..." is not displayed when we have files in there.