Fixed extracting of executables and checking for duplicates closes #1997

Hey @oxtoacart can you take a quick look at this? 1.5.11 was a bit broken =).