You need to zip the files in a specific way. Give ePubPack a try — very simple, and does exactly what you need.
http://sourceforge.net/projects/epubpack/
Btw, to do it by hand, here's what you need to do:
- Create an empty .zip file with whatever name you like (See notes below for detailed instructions on how to do this.)
- Copy the mimetype file into the zip file (don't use compression on this file)
- Copy the rest of the files and folders mentioned above into the zip file *
- Re-name the .zip extension to .epub
* The specification recommends that the books files go in an "OEBPS" folder inside the zip file. If you put them in another spot, be sure that container.xml in the META-INF folder points to the correct location of the *.opf file.
Info from:
http://www.jedisaber.com/eBooks/Tutorial03.shtml