added support for epub + doc

Added support for header determined by extension, now supporting epub
files.