Added function to calculate md5 hash.
Generate the package filename from the md5 hash of its apps, which is better for staying within the length limit for filenames and reducing filename collisions. Updated tests.