refactor get_parent_dir_and_version_from_tarball function

split in two and add tests
add some more comments about plain_version and parsing the %setup field