duplicate handling

some issues with upper and lower case files though (-e doesn't seem to
be case sensitive?)