Add dedup.pl

Also move mvfiles and rmfiles into a separate directory.