Unzipped directory name doesn't match file name

Latest snapshot of red5, http://builds.apache.org/job/Red5%20Trunk/lastSuccessfulBuild/artifact/trunk/target/red5-server-1.0.2-SNAPSHOT-server.tar.gz, decompresses to red5-server-1.0.2-SNAPSHOT not red5-server-1.0.2-SNAPSHOT-server. 'Guess' decompressed directory name by picking first directory in temp directory.