Binutils has a "contrib" subdirectory - thus flattening cannot happen without renaming the upper level contrib directory in a first pass. Also, don't record this move and remove any keyword expansion.
Believe it or not, this is heavily stripped down.