Added a test to check if image or not
Created a check for dupllicate name test and a way to rename duplicates.