Created duplicate check

Split the create function into createbuildroot and createiso.
Added checkduplicate function which removes all but the latest available version of a package if multiple versions are found.