Fixed issue where packages that didn't contain versioning information would break the script in already flattened directory.