Added flatten-directories script for jenkins.