Quick question, do we need to do this dance? Because the name of the first directory inside the archive should still be the name of the archive, as in this example:

    $OTPROOT/lib/mnesia-4.4.7.ez/mnesia-4.4.7/ebin

Or there is something else I am missing? :)