versions: drop redundant pathname creation
versions: use path attribute instead of reconstructing it
versions: don't recreate the relative path on each iteration
versions: remove --compact option