To unzip the epub, move the ePub to a folder, cd to it then simply:
unzip MyEbook.epub
E-book readers require that the mimetype file is the first one in the zip document. What's more, to be fully compliant, this file should start at a very specific point - a 30-byte offset from the beginning of the zip file (so that the mimetype text itself starts at byte 38). If this sounds intimidating, don't worry. It's actually quite easy to achieve if you're careful.